favicon-checker.com

Favicon not updating: how to clear the cache

Updated

A favicon that is not updating is usually stuck in the browser: browsers keep favicons in a cache of their own, which a normal reload doesn't touch. The quickest fix is to give the icon a new URL, either a new filename or a version query like /favicon.svg?v=2, and update the <link> tags. Before that, make sure your server and CDN really send the new file.

First: is the server sending the new icon?

Open the icon URL directly, for example https://example.com/favicon.ico, in a private window. If you see the old icon there, the problem is on the server side: a CDN or proxy still holds the old file, the deploy didn't replace it, or the HTML points somewhere else. Favicon Checker fetches every declared icon fresh and shows the cache headers your server sends.

Change the URL

A new URL gets past the browser cache, the CDN and Google in one step:

<link rel="icon" href="/favicon.ico?v=2" sizes="32x32">
<link rel="icon" href="/favicon.svg?v=2" type="image/svg+xml">
<link rel="apple-touch-icon" href="/apple-touch-icon.png?v=2">

Do it for the manifest icons too. /favicon.ico itself can't be renamed, since browsers request that exact path; a CDN purge takes care of it.

Clear it in the browser

  • Chrome and Edge: open the icon URL in a tab, press Ctrl+Shift+R (Cmd+Shift+R on a Mac), then reload your page. Icons are stored with your history, so if the old one sticks, delete the site's history entries or restart the browser.
  • Firefox: the direct-URL reload works here too. Firefox also keeps icons with history: open the Library, right-click the site and choose Forget About This Site.
  • Safari: quit Safari fully and reopen it. On a Mac, Develop → Empty Caches helps as well (turn on the Develop menu in Settings → Advanced).

Set sensible cache headers

Icons rarely change, so long caching is fine as long as you change the URL when the icon changes. Files with a version in the name or query can be cached for a year:

Cache-Control: public, max-age=31536000, immutable

For icons at fixed paths, such as /favicon.ico, a day to a week keeps visitors from waiting months for a rebrand:

Cache-Control: public, max-age=604800

Home screens and installed apps

iOS copies the Apple touch icon when someone adds your site to the home screen and never refreshes it. The visitor has to remove the shortcut and add it again. Installed web apps are different: Chrome checks the manifest of an installed app from time to time and picks up a changed icon. On Android it may ask the user before switching.

Google Search

Google refreshes the favicon when it recrawls your homepage, which can take days or weeks. Request indexing of the homepage in Search Console to nudge it. If the icon still doesn't change, check it against Google's favicon requirements.