Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I force a favicon refresh?

Tags:

favicon

I have a Grails application running locally using its own tomcat and I have just changed the favicon for a new one. Problem is that I can not see it in any browser. The old favicon shows up or I get no favicon at all, but not my new one. I do not think this is a Grails issue per se, more an issue with favicons.

What is supposed to happen with favicons? How are they supposed to work? I have numerous bookmarks in my browser which have the wrong icons and they never seem to get refreshed. How do I force the server/browser to stop caching them? It seems pretty silly to always cache them given they are normally only 16x16. Why not just upload them with every visit to the page? It is not exactly a huge overhead.

like image 231
Simon Avatar asked Feb 05 '10 17:02

Simon


People also ask

How long does it take a favicon to update?

For the most part it seems like most SEOs said it takes around 24 hours, sometimes less. The guidelines specifically say "Google will look for and update your favicon whenever it crawls your home page.

What is favicon cache?

The Favicon Cache folder contains the database and stored favicons for pages already visited.

Why is my favicon not showing up?

When you add a favicon to your site, it may not show up since your browser has 'saved' your site as one without a favicon. You need to clear the cache in your browser or use a different browser.

How do I get a favicon to show?

If you only want one favicon for your entire domain, simply save the favicon. ico file to the root folder of your site. When uploaded, it must be accessible from http://www.yourdomain.com/favicon.ico . As soon as you upload the file, your browser should start displaying the icon for all pages on your site.


1 Answers

To refresh your site's favicon you can force browsers to download a new version using the link tag and a query string on your filename.
This is especially helpful in production environments to make sure your users get the update.

<link rel="icon" href="http://www.yoursite.com/favicon.ico?v=2" /> 
like image 147
Mark Avatar answered Nov 22 '22 12:11

Mark