Nov 24, 2009

Favicon Shows Only On Main Domain Url ?

free web hosting
Open Discussion & Free Web Hosting > Computers & Tech > Designing > Web Design and HTML

Favicon Shows Only On Main Domain Url ?

miCRoSCoPiC^eaRthLinG
Hey guys,
I've got the following two lines in my WordPress theme header to help me display the favicon.

CODE
<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://chaos-laboratory.com/coding/ the icon won't show at all !!!

Anyone else encourtered this and got any bright idea to fix it ??

Thanks & Cheers,
m^e

 

 

 


Comment/Reply (w/o sign-up)

turbopowerdmaxsteel
QUOTE(miCRoSCoPiC^eaRthLinG @ Mar 29 2007, 11:14 AM) *
Hey guys,
I've got the following two lines in my WordPress theme header to help me display the favicon.

CODE
<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://chaos-laboratory.com/coding/ 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://chaos-laboratory.com/coding/favicon.ico

Using the full link http://chaos-laboratory.com/favicon.ico would do the job.

CODE
<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://chaos-laboratory.com/coding/ too.

 

 

 


Comment/Reply (w/o sign-up)

Niru
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 biggrin.gif ) for the main page only at: www.fun.niranvv.com
But, its working fine for the inner directories also ( without specifying the favicon location smile.gif )
I mean, you can see the same favicon for my inner folder: www.fun.niranvv.com/directory
in both Firefox and IE 7
May I know what browser you are using?
Please check www.fun.niranvv.com/directory, If you can see the FavIcon there, then that will be the problem with html codes in your site! biggrin.gif

Comment/Reply (w/o sign-up)

turbopowerdmaxsteel
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.

Comment/Reply (w/o sign-up)

pyost
QUOTE(turbopowerdmaxsteel @ Mar 29 2007, 08:20 AM) *
The problem is that the href attribute for the tag - 'favicon.ico' exists in http://chaos-laboratory.com/favicon.ico and not in http://chaos-laboratory.com/coding/favicon.ico


I wouldn't count on it wink.gif The thing is that http://chaos-laboratory.com/coding/ 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.

Comment/Reply (w/o sign-up)

faulty.lee
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

Comment/Reply (w/o sign-up)

turbopowerdmaxsteel
QUOTE(pyost @ Mar 29 2007, 02:56 PM) *
I wouldn't count on it wink.gif The thing is that http://chaos-laboratory.com/coding/ 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


Well, I am not an expert at the .htaccess magic. But it does point like that. See this page for example:-

http://ntek.astahost.com/wip/

You'll notice the following code:-

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://ntek.astahost.com/about/

The code in this case is:-

CODE
<link rel="shortcut icon" href="findicon.ico" />


The favicon exists in the root folder as http://ntek.astahost.com/findicon.ico. Yet, the favicon is not shown.

Now check out this page:-

http://ntek.astahost.com/products/

The code in this case is:-

CODE
<link rel="shortcut icon" href="http://ntek.astahost.com/findicon.ico" />


Using the abosule URL solves all hierarchy problem.

Comment/Reply (w/o sign-up)

miCRoSCoPiC^eaRthLinG
Tried out all the techniques and only the full-url seems to work fine in all cases.. so full-url it is !! biggrin.gif

Thanks to all of you... was a very interesting discussion.

Cheers,
m^e

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)


See Also,

*SIMILAR VIDEOS*
Searching Video's for favicon, shows, main, domain, url,
advertisement



Favicon Shows Only On Main Domain Url ?

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com