miCRoSCoPiC^eaRthLinG 0 Report post Posted March 29, 2007 Hey guys, I've got the following two lines in my WordPress theme header to help me display the favicon. <link rel="icon" href="favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />Using either would have done the job - but I was told to include both so as to ensure the display of the favicon in IE and non-IE browsers. Now my question is, the icon shows up ONLY when you access my site using the main domain's URL, i.e. http://chaos-laboratory.com/. If you're reading any post / page below it, e.g. http://forums.xisto.com/no_longer_exists/ the icon won't show at all !!! Anyone else encourtered this and got any bright idea to fix it ?? Thanks & Cheers, m^e Share this post Link to post Share on other sites
turbopowerdmaxsteel 0 Report post Posted March 29, 2007 (edited) Hey guys, I've got the following two lines in my WordPress theme header to help me display the favicon. <link rel="icon" href="favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />Using either would have done the job - but I was told to include both so as to ensure the display of the favicon in IE and non-IE browsers. Now my question is, the icon shows up ONLY when you access my site using the main domain's URL, i.e. http://chaos-laboratory.com/. If you're reading any post / page below it, e.g. http://forums.xisto.com/no_longer_exists/ the icon won't show at all !!! Anyone else encourtered this and got any bright idea to fix it ?? Thanks & Cheers, m^e The problem is that the href attribute for the tag - 'favicon.ico' exists in http://chaos-laboratory.com/favicon.ico and not in http://forums.xisto.com/no_longer_exists/favicon.ico Using the full link http://chaos-laboratory.com/favicon.ico would do the job. <link rel="icon" href="http://chaos-laboratory.com/coding/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="http://chaos-laboratory.com/coding/favicon.ico" type="image/x-icon" /> Although I must say, IE7 is smart and it shows the favicon at http://forums.xisto.com/no_longer_exists/ too. Edited March 29, 2007 by turbopowerdmaxsteel (see edit history) Share this post Link to post Share on other sites
niran 0 Report post Posted March 29, 2007 I think, for IE and Firefox it will automatically search for the Favicon in the main page of the domain! For me, Im using the favicon (Animated one fore Firefox ) for the main page only at: http://niran.in/ but, its working fine for the inner directories also ( without specifying the favicon location ) I mean, you can see the same favicon for my inner folder: http://forums.xisto.com/no_longer_exists/ in both Firefox and IE 7May I know what browser you are using? Please check http://forums.xisto.com/no_longer_exists/, If you can see the FavIcon there, then that will be the problem with html codes in your site! Share this post Link to post Share on other sites
turbopowerdmaxsteel 0 Report post Posted March 29, 2007 I did some Testing on this matter & this is what I came up with:- No Link tag in Page:- Firefox - Doesn't display the favicon. IE7 - Looks for favicon.ico in the current folder and displays it if found. Using rel="shortcut icon" Firefox - Displays the favicon when the href points to the correct location or the favicon.ico exists in the current folder. IE7 - Displays the favicon when the href points to the correct location or the favicon.ico exists in the current folder. Using rel="icon" Firefox - Displays the favicon when the href points to the correct location or the favicon.ico exists in the current folder. IE7 - Displays the favicon when the href points to the correct location or the favicon.ico exists in the current folder. Eitherways, the href attribute MUST point to the correct image/icon. Use rel="icon" only when you want an animated favicon (GIF) to be shown. rel="shortcut icon" will work in most browsers as the standard compliant browsers ignore shortcut and use icon, while IE interprets "shortcut icon" as a single name. Share this post Link to post Share on other sites
pyost 0 Report post Posted March 29, 2007 The problem is that the href attribute for the tag - 'favicon.ico' exists in http://chaos-laboratory.com/favicon.ico and not in http://forums.xisto.com/no_longer_exists/I wouldn't count on it The thing is that http://forums.xisto.com/no_longer_exists/ isn't the real URL - it is a dynamic URL "rewritten" with .htaccess to make the web site more optimized for search browsers. What's hidden behind this folder structure is index.php?someParameters. Since the PHP code isn't "fooled" by this, favicon.ico will not be pointing to coding/favicon.ico However, the issue still remains. I guess you could try removing the type part, but I doubt that would solve the problem. Your best shot might be what turbopowerdmaxsteel - use the absolute URL. Share this post Link to post Share on other sites
faulty.lee 0 Report post Posted March 29, 2007 Hmm, interesting. I never realized that i can have different favicon under different sub dir. Well the web is always deep and full of interesting stuffs to be explore Share this post Link to post Share on other sites
turbopowerdmaxsteel 0 Report post Posted March 29, 2007 I wouldn't count on it The thing is that http://forums.xisto.com/no_longer_exists/ isn't the real URL - it is a dynamic URL "rewritten" with .htaccess to make the web site more optimized for search browsers. What's hidden behind this folder structure is index.php?someParameters. Since the PHP code isn't "fooled" by this, favicon.ico will not be pointing to coding/favicon.icoWell, I am not an expert at the .htaccess magic. But it does point like that. See this page for example:- http://forums.xisto.com/no_longer_exists/ You'll notice the following code:- <link rel="shortcut icon" href="favicon.ico" />The favicon.ico does not exist in the root folder rather in the wip folder itself. The favicon is shown in both IE7 and Firefox in this case. While check out another page:- http://forums.xisto.com/no_longer_exists/ The code in this case is:- <link rel="shortcut icon" href="findicon.ico" />The favicon exists in the root folder as http://forums.xisto.com/no_longer_exists/. Yet, the favicon is not shown. Now check out this page:- http://forums.xisto.com/no_longer_exists/ The code in this case is:- <link rel="shortcut icon" href="http://ntek.astahost.com/findicon.ico" /> Using the abosule URL solves all hierarchy problem. Share this post Link to post Share on other sites
miCRoSCoPiC^eaRthLinG 0 Report post Posted March 29, 2007 Tried out all the techniques and only the full-url seems to work fine in all cases.. so full-url it is !! ;)Thanks to all of you... was a very interesting discussion.Cheers,m^e Share this post Link to post Share on other sites