Darghon Posted October 22, 2012 Share Posted October 22, 2012 Hi all, I have a favicon added to a global template in Yii, so the favicon is included in every page, and it also shows in every page. except in a few... There are a few pages in the project that don't display the favicon despite having the exact same layout files as all the others... part of the head tag of the template => <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="language" content="en" /> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" /> <link rel="icon" type="image/x-icon" href="images/favicon.ico" /> <link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico" /> I've checked the source code and the header is exactly the same as all the other pages, with sometimes a few javascript includes more or less if I edit the favicon value using firebug the icon "reappears" even if I restore the original source (so removing or adding a "/" before the href) chrome always show the favicon, firefox doesn't (on a few pages). What could be a reason for this problem? googling has led me nowhere... If more info is needed, ask and i'll supply. unfortionatly the website I'm working on isn't public, so I can't share the links to the actual pages.... Quote Link to comment Share on other sites More sharing options...
Christian F. Posted October 22, 2012 Share Posted October 22, 2012 (edited) How does the URL look for the pages where it doesn't show? Alternatively, have you tried with adding a slash to the URLs in the template file? Edited October 22, 2012 by Christian F. Quote Link to comment Share on other sites More sharing options...
Darghon Posted October 23, 2012 Author Share Posted October 23, 2012 Hi, I can't give the url's atm, cause I'm not at my work, but I can tell you that adding or removing the leading '/' does nothing. The page it mostly doesn't show the favicon is a page that uses a lot of drag & drop events, as well as a hash tag which defines what is currently shown. (its a kind of calendar with drag/drop event adder and a "current month" tracing through the hash tag => http://www.example.com/some/calendar#2012-10-23) Quote Link to comment Share on other sites More sharing options...
Darghon Posted October 24, 2012 Author Share Posted October 24, 2012 I've just figured out that each time a ancher is added to the url, and the page is reloaded, that the favicon didn't show. so looking for that problem specific, I've found that it's an existing firefox issue. I've managed to solve this issue by adding the following javascript code after setting or reading the hash tag. $('link[type*=icon]').detach().appendTo('head'); Hopefully this'll be helpfull to others as well. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.