erich.wanker Posted July 25, 2014 Posted July 25, 2014 Hello .. is it possible to change the favicon and Title (Browser-Tab) at runtime? ... i want to change the icon and title of browserTab - depending on the menuepoint of my ungui-application ... and is it possible to use a png? ThaX for suggestions :-)
Sherzod Posted July 25, 2014 Posted July 25, 2014 Hi http://mathiasbynens.be/demo/dynamic-favicons ... Works in Firefox, Opera, and Chrome. Fails in Safari and Internet Explorer function changeFavicon(src) { var link = document.createElement('link'), oldLink = document.getElementById('dynamic-favicon'); link.id = 'dynamic-favicon'; link.rel = 'shortcut icon'; link.href = src; if (oldLink) { document.head.removeChild(oldLink); } document.head.appendChild(link); }; changeFavicon('http://www.google.com/favicon.ico'); Best regards 1
Sherzod Posted July 26, 2014 Posted July 26, 2014 and is it possible to use a png? Try var link = document.createElement('link'); link.type = 'image/png'; //link.type = 'image/ico'; link.rel = 'icon'; link.href = 'images/ok.png'; //link.href = 'http://www.google.com/favicon.ico'; document.getElementsByTagName('head')[0].appendChild(link); Best regards
diegojmap Posted August 25, 2018 Posted August 25, 2018 Taking advantage of the subject. In the migration to sencha 6 the icon of the forms stayed like this. I could not solve it. Has anyone gone through this?
Recommended Posts