Jump to content
StudioWeb Forums

Favicon Question

Recommended Posts



I am having trouble displaying the favicon on a a particular page...




As you can see from the path, this page is not in the root site folder, but I think I have pasted in the favicon code into the header of the page correctly and made sure that the path of the .ico file is sitting in the same folder as this html page.


I'm stumped! I dont know why the Magento favicon is still showing.


Thanks in advance for any help.



Link to post
Share on other sites

Hmm, I'm not quite sure what you mean Andrea. How did you find that path? The path I see when I view source code is just...


<link rel="icon" href="favicon.ico" type="image/x-icon" />


...which means its in the same folder as the html page itself, correct?


...and what are you seeing that's pink???





Link to post
Share on other sites

I viewed your page with Firefox - have the webdeveloper's toolbar installed - went to view source which shows me the code and that tells me it your link to your favicon is here:

<link rel="icon" href="[url="view-source:http://customhcg.com/ebook/favicon.ico"]favicon.ico[/url]" type="image/x-icon" />

and once I click the hyperlink, I end up there : http://customhcg.com/ebook/favicon.ico - and when I click that link, I see the pink favicon.

Link to post
Share on other sites
...which means its in the same folder as the html page itself, correct?


Correct. If you go down to a sub-folder page, the path of the favicon will change too. So it's good to just put the full absolute URL there, instead of a relative path.


Oh and your favicon is Orange on my screen. Looks exactly like the Magento CMS favicon :)

Link to post
Share on other sites

...and if you don't see your favicon but everyone else does you may just need to clear your cache. In most cases IE seems to be the one that causes that. Sometimes just simply closing and opening your browser does the trick.


There are two different lines of code that renders an icon:


<link rel="shortcut icon" href="http://www.domain.com/favicon.ico"'>http://www.domain.com/favicon.ico" type="image/x-icon">

<link rel="icon" href="http://www.domain.com/favicon.ico" type="image/x-icon">


The second is the most common. I found that applying both rids of the problem of not having it display regardless if you clear your cache or not but I just don't think using the first one is necessary and is not required.

Link to post
Share on other sites

OK, no I'm really confused. I have changed the .ico path to an absolute path. When you view page source code and click on the .ico link....it clearly shows the correct favicon image (green leaf). But the page is still showing the Magento default favicon in the browser.


Can anyone figure this out? I'm totally lost now.

Link to post
Share on other sites

Favicons can be in the root directory and also in a link in the page head section. In fact, a favicon should always be in the root directory and then you don't usually need it in the page head section link unless you want a different favicon for only that page.


This link to the favicon.ico in your root directory


shows the Magento favicon, so change it in the root directory to your leaf icon (which must be called favicon.ico).


Edit - it may take some time for a search engine to take the new favicon.



says "You don't need to upload one to every directory of your site if you don't want to waste space - simply put it in your root directory and the web browsers that support favicons will apparently locate it eventually."


"IE...tries to obtain that icon by first requesting for "favicon.ico" from the directory of your web page. If it cannot find such a file, it will try to obtain it from the root directory of your website"


I found this which shows where to find the root dirctory when using a Magento theme:-


Edited by Wickham
Link to post
Share on other sites

OK, I have done that. I changed the URL to look for the .ico fil in th website's root folder now (http://customhcg.com/favicon.ico'>http://customhcg.com/favicon.ico).


The Magento favicon is STILL showing.


As you can see if you go to the home page of this website (http://customhcg.com)....this is the correct favicon that is pulling up just fine for the home page but for some reason NOT for this page I am having problems with - even with changing the URL to the .ico file in the root folder (as you recommended).



Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...