Browser not updating favicon

To refresh your site's favicon you can force browsers to download a new version using the link tag and a querystring on your filename.

This is especially helpful in production environments to make sure your users get the update.

The fix could have been shorter and faster, by deleting the complete caches from your browser it would have been updated without trying the above fixes, but it's not always wiser to use easier solution.

The reason we didn't clear the complete cache was that it would have removed caches of every webpage and you don't want to lose all important information from your browser.

Short of changing the name of the favicon, there is no way you can force your users to get a new copy This is a workaround for the chrome bug: change the rel attribute to stylesheet! Works like a charm: I came up with this workaround because we also have a requirement to be able to update customer's sites / production code and I didn't find any of the other solutions to work.

I know this is a really old question but it is also one that is still relevant, though these days applies only to mozilla.

However, it turns out that this only works for the first five minutes or so, until the icon gets irretrievably lost in Chrome's history synchronization.

You don't have to clear your cache, restart your browser, or rewrite your HTML - you just need to change the icon's URL, once, so that the browser will forget the previously-cached icon.

Chrome is well behaved if one includes an icon tag in the header.

It seems pretty silly to always cache them given they are normally only 16x16.

Why not just upload every visit to the page, it's not exactly a huge overhead.

In current version of chrome (on OSX) if you do the following you will get an instant favicon refresh: This way the Favicon will always refresh when it has been changed.

As pointed out in the comments you can also use the last modified date instead of the MD5-Hash to achieve the same thing and save a bit on server performance: Well, overhead is overhead, but yes, not too big.

Leave a Reply