erich.wanker Posted July 25, 2014 Share 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 :-) Link to comment Share on other sites More sharing options...
Sherzod Posted July 25, 2014 Share 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 Link to comment Share on other sites More sharing options...
erdal Posted July 25, 2014 Share Posted July 25, 2014 fine thanks. Link to comment Share on other sites More sharing options...
Sherzod Posted July 26, 2014 Share 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 Link to comment Share on other sites More sharing options...
diegojmap Posted August 25, 2018 Share 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? Link to comment Share on other sites More sharing options...
Recommended Posts