How to force the favicon.ico update?

Asked

Viewed 1,838 times

2

I have a problem with favicon.ico, he appears wrong.

A while ago, I made a website that used a favicon.ico. After that, I’ve already made some 3 sites and the problem occurs in all.

Although I put the URL of favicon.ico for a picture, it shows in the browser the favicon of the previous site.

Looking at the Ctr+U (Source code), and clicking on the link that calls the favicon, the picture that opens is the correct one. But in the browser always appears the wrong one. And that image doesn’t even exist in the website folder anymore.

I already cleaned the browsing cache, after that I have even formatted the computer and continues this error.

Can it be Chrome’s thing saving it in "cloud" similar to what it does with bookmarks? If so, how to fix it?

  • This is cache, or the new favicon was written in the wrong format. If you use <link> for favicon, simply use different names for each issue and it’s solved. In fact, in this case it doesn’t even pay to use the format. ico, which has bad compression. Leave a neutral favicon.ico only as fallback, for older browsers.

  • This is really cache, with me I always open the image in another tab, and then update the page, the new image appears...

  • I’m starting to think it’s a google thing because cleaning cache doesn’t solve it. I tried it here in firefox and it didn’t give this problem.

2 answers

5

To force the update of favicon, use a query string in your file name. For example:

<link rel="icon" href="http://www.seusite.com/favicon.ico?v=2" />

This forces browsers to download the new favicon version.

I also had this same problem in projects that tested on the same domain, and adding to query string ?v=2 (or any random version number) at the end of the URL on <link />, the upgrade to the new version is done successfully! Even Stack Overflow itself uses this method.

  • Yes, but that only occurs on Chrome. But I will do what I said and I will.

-4

if your internet provider is local, the guy should use cache and you access only some current files from your online site, other files (like icone for example), Windows access the version stored in his cache.

if this is the case, talk to the internet provider and ask to deactivate the cache that goes to your machine

Browser other questions tagged

You are not signed in. Login or sign up in order to post.