Tag Archives: cache

How to Refresh Site Favicons in Google Chrome Tips, Tricks and Tutorials 10 SEP 2013

google-chrome-logoFavicons are the immensely useful little icon images that give you a quick visual cue as to the sites currently being displayed in your open tabs or bookmarks bar. To speed things up, Google Chrome obviously caches these favicons, given the fact that these almost never ever change. However, if you do want to ensure that you have the latest and greatest favicons employed by your favourite sites, then here is a foolproof (because yes, sometimes force refresh doesn’t actually refresh eveything!) technique to refresh your favicons in Google Chrome:

  1. Close Chrome
  2. Open your User Data folder
  3. Delete the ‘Favicons’ file
  4. Run Chrome

So basically now when you visit a site, Google will be forced to download the favicon because it no longer has it stored. Nice and simple, plus very effective.

If you don’t know where to find your User Data folder, here is a helpful list:

Windows XP

Google Chrome: C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Google\Chrome\User Data\Default
Chromium: C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Chromium\User Data\Default

Windows 7 or Vista

Google Chrome: C:\Users\%USERNAME%\AppData\Local\Google\Chrome\User Data\Default
Chromium: C:\Users\%USERNAME%\AppData\Local\Chromium\User Data\Default

Mac OS X

Google Chrome: ~/Library/Application Support/Google/Chrome/Default
Chromium: ~/Library/Application Support/Chromium/Default

Linux

Google Chrome: ~/.config/google-chrome/Default
Chromium: ~/.config/chromium/Default

Chrome OS

/home/chronos/

Done.

Internet Explorer (IE) and the Cached .js File CodeUnit 13 JAN 2011

Internet Explorer and pretty much all other modern web browsers make use of silent caching in order to streamline user experience. Of course, caching is a marvellous tool when needed, but also a frustrating one when you don’t want it turned on. Enter the humble .js javascript include file.

Now IE likes to cache javascript .js file includes, but unfortunately unlike normal web pages, getting it to refresh its cached copy can sometime prove to be quite difficult to achieve.

So here is the solution then.

Simply add a GET variable to the declaration.

If you never want the file to be cached, attach a randomly generated GET variable to the .js declaration for each page load. If you want to control when it gets refreshed, add a GET variable that you change only when you make actual changes to the .js file itself.

Essentially what happens is that IE recognises the URL as a single string, meaning that if the GET variable has changed, the string’s identity has changed, meaning a brand new URL and thus something it will need to go and collect from the internet.

So how does one’s .js file include look now?

<script type=”text/javascript” src=”myscript.js?ver=1″></script>

Simple, but very effective and well worth jotting down.

Nifty.