I don't have a favicon.ico, but IE always makes a request for it.
Is it possible to prevent the browser to make a request for the favicon of my site? Maybe some META-TAG in the HTML header?
I don't have a favicon.ico, but IE always makes a request for it.
Is it possible to prevent the browser to make a request for the favicon of my site? Maybe some META-TAG in the HTML header?
You can't. All you can do is to make that image as small as possible and set some cache invalidation headers (
Expires
,Cache-Control
) far in the future. Here's what Yahoo! has to say about favicon.ico requests.I suggest putting the website into a .zip/compressed folder. This is what an example webpage looked like in a .zip/compressed folder:
This is what it would look like in a normal folder:
In our experience, with Apache falling over on request of favicon.ico, we commented out extra headers in the .htaccess file.
For example we had Header set X-XSS-Protection "1; mode=block"
... but we had forgotten to sudo a2enmod headers beforehand. Commenting out extra headers being sent resolved our favicon.ico issue.
We also had several virtual hosts set up for development, and only failed out with 500 Internal Server Error when using http://localhost and fetching /favicon.ico. If you run "curl -v http://localhost/favicon.ico" and get a warning about the host name not being in the resolver cache or something to that effect, you might experience problems.
It could be as simple as not fetching (we tried that and it didn't work, because our root cause was different) or look around for directives in apache2.conf or .htaccess which might be causing strange 500 Internal Server Error messages.
We found it failed so quickly there was nothing useful in Apache's error logs whatsoever and spent an entire morning changing small things here and there until we resolved the problem of setting extra headers when we had forgotten to have mod_headers loaded!
I believe I've seen this
(I haven't tested it or used it personally though):Anyone had similar experience?
EDIT:
I just tested the above snippet and on a forced full refresh, no favicon requests were seen in Fiddler. I tested against IE8 (Compat mode as IE7 standards) and FF 3.6.