I DO know this question has been asked at least a thousand times in this website alone, but I HAVE read many of those threads, I DO consider myself very knowledgeable and rarely ever ask anything, instead prefer to do my own research.
However, THIS issue is so strange, without hope for real enlightenment (since this question HAS been discussed so often and still I could not benefit from reading there), here is my issue:
favicon.ico exists, and (locally hosted development website) http://website/favicon.ico
displays the correct icon. Its size is a mere 198 Bytes, so the size limit I found in Firefox's about:config of 1024 Bytes is adhered to. According to the wisdom on favicons on the web the browser should ask for favicons on its own when there is nothing in the of the page. However, my apache log clearly shows Firefox (9.01) never even asks for it.
Next: when I add
<link rel="shortcut icon" href="/favicon.ico">
I still don't get a favicon.
Next: when I instead use
<link rel="shortcut icon" href="/favicon.ico?">
(note the trailing "?") I suddenly DO get a favicon. BUt it cannot be a cache issue! First, I have cleared the cache, second, as I mentioned above, I already successfully loaded the icon file into Firefox through its URL http://website/favicon.ico
I am unable to explain this behavior of Firefox. Chrome shows the correct favicon, by the way.
This is my page head:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="/favicon.ico?" />
</head>
...
As soon as I append at least the "?" after "ico" it works.
Here is what the server sends when the icon is requested, since some have asked for this. I have no idea why this would be useful, since a) I said my cache was empty for each test (checked with about:cache too), and b) I said the server is never even asked for the file when it does not show up. Firefox just does not ask without the "?" - with cache empty! The request shows up in the apache log ONLY when I use the appended "?".
Date Fri, 23 Dec 2011 12:53:22 GMT
Server Apache/2.2.20 (Ubuntu)
Last-Modified Fri, 23 Dec 2011 12:02:49 GMT
Etag "12c07fe-c6-4b4c132190e30"
Accept-Ranges bytes
Content-Length 198
Content-Type image/x-icon