Member-only story

How To Force Refresh A Cached Favicon Image

--

Photo by Moose Photos from Pexels

If you have updated an Favicon image for your website, and its not showing, you simply need to update the URL of the image to force the cached image to refresh.

YOU DO NOT NEED TO UPDATE THE FILE NAME — Keep the file name as favicon.ico only update the href to include the favicon.ico?v=2

You can do this by adding “?=v2” to the end of your file name “favicon.ico” and it will force the browser to load the new image next time the site is visited. e.g your file path would be something like :

http://www.mywebsite.com/favicon.ico?v=2

If the site you are updating already has “?=v2” at the end of the URL simply change it to “?=v3” and so on.

Happy Coding 😀

--

--

holly bourneville
holly bourneville

Written by holly bourneville

Hi Im Holly! I’m from New Zealand. I’m in my first job as a Front End Web Developer and want to share my learnings and thoughts along the way!

No responses yet