Disclosure: Some of the links in this post could be "affiliate links." This means if you click on an affiliate link and purchase an item, I will receive an affiliate commission.

How To Change Favicons - Cached

I ran into a problem when I wanted to change favicons, it wouldn't work. I have set my .htaccess file to store the favicon.ico in the cache, so that visitors doesn't have to wait for it to download every time they visit this site. This is usually the case for every website, so I decided to tell you how I did it. It's actually very easy and won't take 5 minutes.

Change A Cached Favicon

A favicon is the shortcut icon of your website, it's the small image in the tab. If you found this tutorial, you should already have a favicon to use. If not, all you need is a 16x16 image, saved as an .ico. A great favicon can really make your web design complete, so make sure you design a great looking favicon. You might get some inspiration from my favicon below.

How to save as .ico

If you have Photoshop installed you can use a plugin called ICOFormat and here's how to Install it. If you don't have Photoshop, you can generate an .ico file from a .png, by using Dynamic Drive- FavIcon Generator.

favicon   How To Change Favicons   Cached This is my current favicon. I managed to change to change it by adding ?v=2 to the end of favicon.ico.

Old favicon

<link href="http://rushtips.com/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />

New favicon:

<link href="http://rushtips.com/favicon.ico?v=2" rel="shortcut icon" type="image/vnd.microsoft.icon" />

In Joomla

- Edit this file:

/public_html/libraries/joomla/document/html/html.php

On line 541- Edit this:

$icon = $dir . 'favicon.ico';

To this:

$icon = $dir . 'favicon.ico?v=2';

Final notes: If you want to change it again in the future, just rename the favicon version ?v=3, and so on. Hope it helps!

Leave a Reply