busydad — 2013-08-28T18:32:13-04:00 — #1
Can someone update me as to which script I should use to ensure a favicon.ico file shows in all browsers? I have the favicon.ico in the public_html folder.
ralphm — 2013-08-28T19:08:15-04:00 — #2
Hi Busydad. Welcome to the forums.
There are some variations on it, but something like this should work fine:
<link rel="shortcut icon" href="/favicon.ico" />
Sometimes you need to jog the browser to grab the favicon—especially if you visited the site before adding the favicon. Try hard refreshing the browser, and/or bookmarking the page.
stomme_poes — 2013-08-30T15:24:12-04:00 — #3
Used to be, IE actually demanded you "favourite" the page before it would display a "favicon", but I can't imagine that's still the case with IE9 or 10.
most browsers look in the root for something called "favicon.ico" whether you've got one there or not, the source of many ignored 404's. Putting in the url to your favicon should prevent that wasted GET, and so long as you have a valid path, you can put the favicon wherever you want. The rel="icon" would have been enough, but some versions of IE only look for "shortcut". meh.
busydad — 2013-09-01T16:17:08-04:00 — #4
Thanks for the support, but still no luck with IE. You can check the script on my website fence-pro.co.nz
mittineague — 2013-09-01T18:10:09-04:00 — #5
You have a favicon.ico file under the root, but it is a PNG image ~not~ an X-ICON image.
My guess is IE is confused and so shows nothing.
ralphm — 2013-09-01T18:19:41-04:00 — #6
Yes, if you are using .ico, it must be an actual .ico file. And note that you can't just change the file extension. There is an add-on for Photoshop that enables you to create a proper .ico file, and there are also some online generators out there.
For proper browsers, you can just use a .png these days instead, but I'm not sure which (if any) versions of IE play ball with that.