How do I force a favicon refresh?
Asked Answered
C

35

1686

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.

Callipash answered 5/2, 2010 at 17:9 Comment(6)
The accepted and highly upvoted solution is NOT the real solution. The actual reason why refresh won't work can be found in this question's solution: #8616516 --- the icon cache is in a sqlite DB file, independent of the browser cache!Mckinnie
The accepted and highly upvoted solution is solution for production, or do shall I write tutorial for users how to clear their favicon cache when ever we update favicon for production?Lipophilic
Is not a general solution. What if you are using favicon default location without touching your code? That is, a favicon.ico file in your document root.Salmonoid
xkcd.com/1854Hymnal
If anyone's wondering: Chromium have decided not to fix this one, and instead require that related history entries and bookmarks are removed: bugs.chromium.org/p/chromium/issues/detail?id=440322Detoxicate
I'm not convinced you should be forcing a refresh. Browsers cache stuff for a reason, and if you break the browser's cacheing, then that's BAD (tm). For testing purposes, just clear the cache. For production purposes, just let their cache expire and they'll get the new favicon in due course.Wrathful
T
2241

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" />
Tye answered 19/8, 2011 at 3:39 Comment(19)
This did the trick for me. I had to remove type="image/x-icon" from my code, contrary to many sources. I used a file modified timestamp for the v?=2 part of the query.Penthea
The Chrome browser will still display the wrong favicon when the page containing this link tag is loaded from cache. The user must manually refresh the page, or the page must be dropped from cache before visiting, for the favicon to update.Rausch
I have found that in some browsers the favicon did no tupdate no matter what unless I deleted the history. Then it will save the new favicon.Greenfield
Unfortunately you need the fully-qualified absolute URL for IE7 (&IE8?) - see jeffcode.blogspot.com.au/2007/12/…Raasch
presumably this technique will fall foul of the problem with many (most?) common proxies (by default) not caching any URLs with query strings?Marrymars
agree with the above comments, but this works for me in all current browsers: <link rel="shortcut icon" href="/favicon.ico?v=2" />Oly
Can I use the same for the Drupal logo as well? My Drupal logo too is not being replaced in some of the systems.Tatianatatianas
@Raj Yes. This technique can be used anywhere a file is being referenced: css files, js files, img tags, css background images, etc.Tye
@VanjaD. I don't think he meant a current time stamp I think he meant a timestamp of the last time it was edited/changed. Makes a lot of sense!Non
You dont even need to update the query param from my testing. faviconPath += '?v=1' is sufficient to update it everytime.Kwa
@VanjaD. Simply having a query string will cause it to be re-fetched every time anyway, as there's no way to override the cache-ability of a .ico, and the default behaviour is to not cache pages which have a query string.Ecstatic
You can also change the href (add the ?v=someval) in your developer tools without refreshing the page. This only affects your browser, not other visitors to your website. Mostly good for development uses.Decumbent
@Decumbent I just independently discovered that you can change the href live as well - I've posted it as a new answer, and developed a script for it (so it will affect visitors to your website): https://mcmap.net/q/45130/-how-do-i-force-a-favicon-refreshMarchland
+1 This is just insane, half an hour waste of time, you think something is wrong first on backend while verifying application paths , you refresh browsers caches like crazy. And then solution like this works. Why browsers are retarded to cache something like that where even cache clearing does not help... (rhetorical)Stabilize
It makes sense to cache favicons because they sometimes push 2-3 kilobytes in size. You don't want to keep transferring all that data. (yes, sarcasm)Bond
Or just [...].ico?2 - it's sufficient. I also store this number as a constant somewhere and just apply it to all resources of a distinct type. e.g. CssVersion, JsVersion, etc.Tilden
Using Firefox, so far this has only changed the tab favicon. It hasn't changed the favicon under my bookmarks or history, even if i delete then then add the bookmark again.Experimental
This is a helpful technique to know for clearing cache of browsers who have visited the site of your production server, but for local development purposes, it's also helpful to realize that you can visit example.com/favicon.ico and press Ctrl+Shift+R several times. :-) #2209433Pinnatipartite
doesn't answer the question of how to refresh the faviconMerimerida
A
879

Adapted from lineofbird's answer beloew, you can do the following:

  1. Go directly to the favicon url in the address bar by typing in its address e.g.

    • www.yoursite.com/favicon.ico
    • www.yoursite.com/apple-touch-icon.png
    • etc.
  2. Navigate to the url by pressing Enter

  3. Refresh with Ctrl+F5

  4. Restart your browser (e.g. Chrome, Firefox)

Adiell answered 8/3, 2011 at 23:45 Comment(14)
For the record, do not ctr+f5 if working in a VM on ubuntu, you will siwtch ttys. you will need to ctr+f? where ? is the right number to get back your gui.Disorganization
what about shift+F5 or #12633925Emigration
I found that just visiting the favicon in the web browser (example.com/favicon.ico) and refreshing once to see the new favicon worked in Chrome.Trichotomy
Using this method you probably would overcome the caching, but your existing users cannot. Hence, I find the other answer more valuable.Mcleod
Worth noting that this doesn't work in Firefox 33. First answer is a better choice.Socinus
I had to close dev tools to make this work in Chrome.Huckster
Worked in Firefox 43.0.4 on Mac OS X; just F5 worked for me.Plowman
I didn't have to restart the browser, but I did have to navigate to my website in a tab without devtools open. For some reason, Ctrl+F5'ing in a non-devtools tab did it. I could Ctrl+F5 all I wanted and navigate all over the internet and back to my site as much as I wanted in the devtools tab and it wouldn't ever update the favicon.Truncate
Still wtf'ing, does not work for me with Chrome 54 in Windows 7.Stagnate
The "restart browser" part was the only thing that actually made it work for me. All the other fixes work in theory, but don't actually change the favicon pixels displayed on the browser tab. +1 this answerWilonah
Chrome 56: worked like a charm! Albeit, it did not work in incognito mode.Evaporimeter
Chrome 61/Sierra/localhost:4201 - not working. This answer is what I first do whenever dealing with cache. However, the icon had updated in the browser, but not in tab label - where it's supposed to be seen.Podesta
So the solution is to fix your own browser and just let other people who visit the site figure it out on their own..Uncork
Ctrl+F5 worked for me in Firefox 112.Caaba
S
268

This answer has not been given yet so I thought I'd post it. I looked all around the web, and didn't find a good answer for testing favicons in local development.

In current version of chrome (on OSX) if you do the following you will get an instant favicon refresh:

  1. Hover over tab
  2. Right Click
  3. Select reload
  4. Your favicon should now be refreshed

This is the easiest way I've found to refresh the favicon locally.

Setser answered 23/9, 2014 at 19:14 Comment(9)
Unfortunately this does not work in IE or even Chrome on Windows so it seems that you should go with the accepted answer unless you are only using Chrome on OSX.Idealist
Works in OS X Sierra with Chrome 53.0.2785.143 (64-bit)Daumier
works for me: Chrome 58.0.3029.110, Windows 10, localhostInterrelate
Worked for me: Chrome 59.0.3074.115Argentiferous
Worked on 59.0.3071.115Tyler
Worked on Chrome for Windows 8.Alyse
Worked on Chrome 63.0.3239.84 for Windows 10!Coston
Works in Chrome 67.0 on OSX. Strange it's not working with CMD+Shift+RMeng
Works in Chrome 69 on macOS Sierra.Gosnell
K
65

By destroying the file your browser uses to store old favicons, you can force new ones to be loaded.

  1. Close your browser. Make sure there are no longer browser processes running (e.g. check Task Manager for chrome.exe or firefox.exe).
  2. Navigate to where your browser stores user files:
  3. Delete the favicon cache.
    • For Chrome, remove Favicons and Favicons-journal
    • For Firefox, remove favicons.sqlite

This will almost definitely work. If not:

  • Possibility 1: An update to your browser has changed how the favicon cache works. Please edit this answer with new instructions.
  • Possibility 2: Your favicon problem has nothing to do with overaggressive caching. It may instead be a resource-loading problem – using Developer Tools, make sure the new favicon is downloading properly.
Kohima answered 28/9, 2015 at 12:53 Comment(6)
This did the trick. For me, this was a Google Chrome application favicon issue. Not a DOM favicon issue.Missing
This is a good answer that meets my needs for testing. There is no one real answer for this question because it depends on who needs to refresh it and what they are willing and able to reasonably do.Vesper
Just a little improvement: that same path for any username is %appData%/../Local/Google/Chrome/User Data/DefaultVerona
An easier solution in Chrome is to right click and select Inspect (or CTRL+SHIFT+I), then click and hold the refresh button. A menu will appear with the option to Refresh, Hard Reload, or Empty Cache and Hard Reload. Usually Hard Reload will do it, but if it's stubborn for some reason, Empty Cache and Hard Reload definitely will.Aceldama
On Linux you can find these files at: ~/.config/google-chrome/DefaultPaleobiology
The path of the Firefox favicon cache file is (in Windows): C:\Users\<user>\AppData\Roaming\Mozilla\Firefox\Profiles\et1ewsrn.default-release\favicons.sqlite.Reseda
R
61

Rename the favicon file and add a link in the HTML head element with the new name, such as:

<link rel="SHORTCUT ICON" href="http://www.yoursite.com/favicon2.ico" />
Restaurant answered 5/2, 2010 at 17:14 Comment(4)
I would assume browser can see if favicon name is the same. If it is it won't request its download again and will use one already cached, but if you change the name it will assume it has changed thus requesting it from the server.Infirmary
I had the problem with the IE8. It didn't use the favicon.ico placed in a subfolder. Adding the rel-attribute 'shortcut' fixed it.Quadruplex
Thats not refreshing at all, its changing it to a new one completely.Fester
please note that you have to rename your actual favicon.ico as well (it will be in your build folder or the directory from which the webapp is being served)Hohenstaufen
U
60

If you use PHP you could also use the MD5-Hash of the favicon as a query-string:

<link rel="shortcut icon" href="favicon.ico?v=<?php echo md5_file('favicon.ico') ?>" />

This way the Favicon will always refresh when it has been changed.

As pointed out in the comments you can also use the last modified date instead of the MD5-Hash to achieve the same thing and save a bit on server performance:

<link rel="shortcut icon" href="favicon.ico?v=<?php echo filemtime('favicon.ico') ?>" />
Undirected answered 11/6, 2014 at 14:54 Comment(8)
Nice, this avoids the need to change the href everytime i update the favicon, this answer should have more votes !Cone
The problem with this answer is that you are calculating that hash on every request, and that's something unnecessary and might hurt the sites performance (if lots of users).Smiley
It's not that big of a deal in both sense... a favicon is only a couple of kilobytes... I mean, it won't be less stress on the server than having to server the favicon each time...Adelric
I still don't see any real reason to calculate the MD5. It's easier and just as effective to use the file's last modified date. I see no advantage of using the MD5 over the last modified stamp.Ecstatic
@DiegoJancic As every website uses caching nowadays I don't think this is much of an impact. You can switch to CRC32b if you want, which should be even faster. But still we're talking about microseconds here.Solecism
Good answer. The last modified time is also preferable because it will change only when the favicon file changes and so allow a browser to use its cached version instead of an additional request being sent (more significant than the tiny file size). But nobody would ever notice the difference anyway.Adapt
How often are you really updating your favicon? This seems like overkill. Just use the manual query string when you make a new icon.Verniavernice
Size optimization href="favicon.ico?<?php echo filemtime('favicon.ico') ?> I remove v= characters from link xDSaltatory
M
35

In Chrome on Mac OS X one can remove file with favicon cache

${user.home}/Library/Application Support/Google/Chrome/Default/Favicons 
Marjana answered 25/10, 2013 at 11:33 Comment(4)
This solution worked for me. For some reason, it was not refreshing the favicon with above mentioned methods with far more votes. So thank you, Maxim Mazin. I only wanted to get rid of an old favicon that I knew couldn't exist anymore on my new host.Octofoil
This approach also worked for me on Windows, where I had removed the favicon from my app, but chrome was still showing it. Close Chrome, delete "C:\Users\{user}\AppData\Local\Google\Chrome\User Data\Default\Favicons", then restart Chome. The old unwanted favicon is gone.Addax
I had nothing under "Default" but eventually I found this variation: ${user.home}/Library/Application Support/Google/Chrome/Profile 1/FaviconsYuletide
@Yuletide This didn't initially work for me after trying all the other methods. However I got this one to work after cmd+qing chrome, going to the menu bar, force quitting chrome again and waiting 2 minutes to open the browser and navigate back to my site.Clack
K
19

Depending on the browser they are handled differently, but typically I find that going to the default page of the site, and doing a hard refresh. CTRL + F5 (or ⌘ Command + SHIFT + F5 on macOS), will typically get it to update.

Kampala answered 5/2, 2010 at 17:12 Comment(0)
C
17

Well, overhead is overhead, but yes, not too big.

Also, browsers are sometimes "greedy" about cached files. You could clear cache and/or restart your browser and may see the change. If that fails though...

My cheapo solution is to:

  1. Visit your file at http://example.com/favicon.ico in your browser.
  2. Delete the favicon.ico from your webroot.
  3. Visit http://example.com/favicon.ico again in a browser, verify it's missing.
  4. Upload new one to your webroot.
  5. Visit http://example.com/favicon.ico again in a browser, verify it's the new one.

If that sequence doesn't work, then something else is going on.

Craggy answered 5/2, 2010 at 17:15 Comment(1)
This worked for me, but sadly we can't ask every visitor to do this.Forefront
J
17

ON MAC: + Shift-R or hold down Ctrl and click the reload button in the browser.

Jordon answered 9/7, 2014 at 13:4 Comment(3)
This doesn't force reload of favicons.Cholent
This did reload my favicon / fix the problemImplausibility
Works for ubuntu 16.04Abdul
O
10

More than likely a web browser issue. You will have to delete your cache from your browser, close your browser and reopen it. That should fix it.

I don't believe your favicons will get refreshed on your favorites until you revisit that page, and assuming that you had previously cleared your browsers cache.

Your web browser will not go out to the internet to check for a new favicon on its own... thank goodness.

Oireachtas answered 5/2, 2010 at 17:12 Comment(3)
"Your web browser will not go out to the internet to check for a new favicon on it's own...thank goodness." Why not? Why not refresh it eveyr time a page loads? It's a 2k image, which is peanuts. It should never be out of date. The whole caching idea is just silly in the grand scheme of things.Callipash
developer.yahoo.com/performance/rules.html mentions issues related to downloading favicon.ico that you may not have thought of. Good tips there all around. Caching is a valuable tool for making sure your site runs as fast as is practical. Caching is also useful for making your browser feel as fast as possible.Craggy
@Simon, caching is silly?!? I hope for your clients sakes that you've learned the importance of better web development since 2010. What's "silly" is NOT caching and making unnecessary requests to your server for what amounts to be a static file that rarely, if ever, changes.Faille
O
10

For Internet Explorer, there is another solution:

  1. Open internet explorer.
  2. Click menu > tools > internet options.
  3. Click general > temporary internet files > "settings" button.
  4. Click "view files" button.
  5. Find your old favicon.ico file and delete it.
  6. Restart browser(internet explorer).
Odontoid answered 25/11, 2012 at 1:10 Comment(0)
M
8

Try Opening In a New Tab

I tried many of the things above (resetting cache, refreshing, using the link tag, etc), I even checked my .htaccess file and reset the ExpiresByType variable.

But this is what finally worked for me in both Chrome (25.0.x) and Safari (6.0.1):

  1. Flushing cache
  2. Hard-linking the favicon with the <link> tag
  3. Navigating to mysite.com/favicon.ico
  4. Opening mysite.com in a new tab

(Up until step 3, refreshing in the same tab kept reproducing the old icon.)

Monogamist answered 11/3, 2013 at 11:31 Comment(0)
J
8

For Chrome on macOS, if you don't want to delete the entire Chrome favicon database as suggested already here, you can delete only the conflicting icons:

  1. Quit Chrome
  2. Load the favicons database (using sqlite here):

sqlite3 ~/Library/Application\ Support/Google/Chrome/Default/Favicons

  1. Search for the file that is causing issues

select * from favicons where url = 'http://mysite.dev/favicon.ico';

  1. If you are happy with the output:

delete from favicons where url = 'http://mysite.dev/favicon.ico';


Alternatively, you can search for a pattern that you can reuse to delete multiple entries:


  1. Search for multiple files that are causing issues

select * from favicons where url like 'http://mysite.dev%';

  1. And again if you are happy with what this returns:

delete from favicons where url like 'http://mysite.dev%';


  1. Type .exit and hit return to quit sqlite
  2. Restart Chrome
Jarrell answered 30/1, 2017 at 20:59 Comment(0)
G
8

Chrome Version: 68.0.3440.106

Just restart Chrome (in your address bar): chrome://restart

Geesey answered 1/9, 2018 at 16:4 Comment(0)
K
7

When you request the favicon from Google, you can take a look at the response headers.

Last-Modified: Fri, 09 Jan 2009 16:35:02 GMT
Date: Thu, 01 Dec 2010 00:00:01 GMT
Expires: Fri, 01 Dec 2011 00:00:01 GMT
Cache-Control: public, max-age=31536000
Age: 7

If you put an "Expires: " header on the response, client browsers will re-request the icon after that timestamp. While doing active development, you could set the expires timestamp to a second or two in the future, and always have it fetch this, although that's a poor longterm plan.

Karaite answered 5/2, 2010 at 17:17 Comment(1)
It also only works pre-emptively, which beats the purpose of the question.Blanketing
M
7

Chrome's favicon support is buggy - disregard this answer

I wrote this answer under the impression that this is what it took to refresh favicons in Google Chrome. However, it turns out that this only works for the first five minutes or so, until the icon gets irretrievably lost in Chrome's history synchronization.

Original answer

You don't have to clear your cache, restart your browser, or rewrite your HTML - you just need to change the icon's URL, once, so that the browser will forget the previously-cached icon.

Assuming that you've defined your icon via <link> elements in your page's <head>, you can do that by running this standard-JS one-liner in the console:

[].slice.call(document.querySelectorAll('head>link[rel$="icon"]')).map(function(ln){ln.href+='?v=2'});

For a more advanced implementation of this that can automatically do this for end users in production, see freshicon.js.

Marchland answered 4/6, 2015 at 23:30 Comment(1)
This is actually useful if you're trying to get rid of an cached icon on a server you don't control, where the icon is now missing/returning a non-200 http code. Rather than appending ?v=2 swap out the whole URL for an icon of your choice and it seems to stick around after a refreshCoronel
N
4

I recently restored my bookmarks and was looking for a way to restore the FavIcons without visiting each page. My search brought me to this thread.

For those in a similar circumstance merely download the FAVICON RELOADER addon. Once installed you will find the "reload favorite icons" command in your BOOKMARKS dropdown menu.

https://addons.mozilla.org/en-US/firefox/addon/faviconreloader/?src=api

Numerable answered 30/11, 2011 at 17:15 Comment(1)
It is back there for installation and really lookes promising (you'll find the AddOn within the bookmarks menu) but it also didn't reload the icon on my firefox 34 (on linux) without restartRetarder
T
4

If you are using PHP .. then you can also use this line.

<link rel="shortcut icon" href="http://www.yoursite.com/favicon.ico?v=<?php echo time() ?>" />

It will refresh your favicon on each page load.

Tut answered 27/1, 2014 at 8:17 Comment(5)
That is the problem "It will refresh your favicon on each page load". How about caching? The favicon should be cached.Shark
If you want to cache your new favicon.. just provide any new value like.. <link rel="shortcut icon" href="yoursite.com/favicon.ico?v=12345">Tut
favicon.ico?v=<?php echo md5_file('favicon.ico') as suggested by Felix Wienberg @SharkCone
This is not a good way of solving this problem. Using time() will force it to reload the icon every single time. You want the last modified time of the favicon.ico file not the current wall-clock time.Ecstatic
what if you round to the nearest 24 hours, or nearest 30 days? a monthly cache reset could be usefulDollydolman
T
3

If you are just interested in debugging it to make sure it has changed, you can just add a dummy entry to your /etc/hosts file and hit the new URL. That favicon wouldnt be cached already and you can make sure you new one is working.

Short of changing the name of the favicon, there is no way you can force your users to get a new copy

Toddle answered 4/4, 2011 at 13:46 Comment(0)
I
2

This is a workaround for the chrome bug: change the rel attribute to stylesheet! Keep the original link though. Works like a charm:

I came up with this workaround because we also have a requirement to be able to update customer's sites / production code and I didn't find any of the other solutions to work.

Intimate answered 2/4, 2013 at 16:52 Comment(2)
I tried literally every suggestion (coding) solution on here & this is the only one that worked for me. Do you have any idea why?Mark
Really "like a charm". And the simpliest way.Repertoire
S
2

This works for Chrome:

  • on Mac: delete file

    ${user.home}/Library/Application Support/Google/Chrome/Default/Favicons

  • on Windows: delete files

    C:\Users[username]\AppData\Local\Google\Chrome\User Data\Default\Favicons C:\Users[username]\AppData\Local\Google\Chrome\User Data\Default\Favicons-journal

source

Spencer answered 31/5, 2018 at 11:18 Comment(0)
M
2

Just change this filename='favicon1.ico'

Mistrustful answered 23/7, 2018 at 18:36 Comment(0)
E
2

Close all Google Chrome windows

Adding one more answer that I do not see here. I tried flushing my Google Chrome cache, reloading the tab, refreshing the tab, opening in a new tab, and even opening a new window. Nothing worked for me. What did finally work for me was to close all Google Chrome windows (if you're like me, you probably have 3+ windows with a bunch of tabs, and maybe even have more windows/tabs in another desktop, don't forget those!). Once all of your windows are closed, then try opening a fresh new window and reloading your site.

Hope this helps someone!

Bonus tip: If you'd like to get all your windows back, you can press "Ctrl + Shift + Up Arrow + T" to get your windows and tabs back.

Erleena answered 3/2, 2023 at 19:59 Comment(0)
I
1

Simple,

1: I don't want to fiddle around with codes (ps my site builder doesn't use codes, it uses "upload file" button and it does it itself)

2: I tried the CTRL+F5 and it doesn't work for me so....

I HAVE A SOLUTION:

IE: Clear All browser history and cookies by going to the settings cog O

Chrome: Go to the menu in the top right corner below the X that looks like a = , then go to settings, history, CLEAR BROWSING DATA and check all of the boxes that apply (I did history, cookies and empty the catche from the beginning of time)

Implied answered 30/5, 2013 at 18:32 Comment(2)
the question relates to how favicons are cached. Clearing your local cache is going to fix the problem for you but not for anyone else.Dispart
@MarkChorley which is exactly what the original question is about. Caching of favicons on a local development environment.Jarrell
R
1

I know this is a really old question but it is also one that is still relevant, though these days applies only to mozilla. (I have no idea what explorer does coz we don't code for non standard browsers).

Chrome is well behaved if one includes an icon tag in the header.

Although mozilla are well aware of the issue, as usual, they never fix the annoying small stuff. Even 6 years later.

So, there are two ways of forcing an icon refresh with firefox.

  1. Have all your clients uninstall firefox. Then re-install.

  2. Manually type just the domain in the url bar - do not use http or www just the domain (mydomain.com).

This assumes of course that your ns records include resolution for the domain name only.

Rattoon answered 1/6, 2017 at 23:51 Comment(0)
P
1

Safari on MacOS Safari 17.1

None of the offers solution worked for me, except doing this:

  • Enable the Developer Menu in Safari Preferences
  • Choose "Empty Cache"
  • Restart browser
Painty answered 19/11, 2023 at 10:3 Comment(0)
R
0

Also make sure you put the full image URL not just its relative path:

http://www.example.com/images/favicon.ico

And not:

images/favicon.ico
Roarke answered 6/3, 2010 at 12:32 Comment(3)
/images/favicon.ico is the proper way to do it: it "just works" for different environments (dev/test/production), and is an absolute path - from the document base URL.Blanketing
Unfortunately you need the fully-qualified URL for IE7 (&IE8?) - see jeffcode.blogspot.com.au/2007/12/…Raasch
This isn't really an answer, this is a comment.Fester
M
0

Here's how I managed it with a simply animated favicon and FireFox 3.6.13 (beta version) It will probably work for other versions of FireFox as well, let me know if it doesn't. It's basically artlung's solution, but addressing the .gif file as well:

  1. I opened by FTP program, downloaded my favicon.ico AND favicon.gif files,
  2. then DELETED them from my server's files.
  3. Then I opened them in my browser as artlung suggested: http://mysite.com/favicon.ico AND http://mysite.com/favicon.gif Once those addresses loaded and displayed 404 error pages ("page not found")
  4. I THEN uploaded both files back onto my server, and PRESTO - the correct icons were instantly displayed.
Markowitz answered 10/2, 2011 at 0:51 Comment(1)
Oh - BTW to get the new ones to display I also had to delete my saved bookmark - and this same procedure worked for Google Chrome as well.Markowitz
D
0

If the problem continues despite of applying some steps above:

try to restart the IIS Server.

Dillondillow answered 12/3, 2015 at 11:16 Comment(0)
Q
0

Use query string at the end of the file path. Query string variable value must be different with every build.

if previous build is:

<link rel="icon" href="http://example.com/favicon.ico?v=v1" />

OR

<link rel="icon" href="http://example.com/favicon.ico?v=stringA" />

then next build should be:

<link rel="icon" href="http://example.com/favicon.ico?v=v2" />

OR

<link rel="icon" href="http://example.com/favicon.ico?v=stringB" />

Quinque answered 19/2, 2022 at 10:56 Comment(0)
C
0

Using "Empty Caches" from the "Develop" menu is the only thing that worked for me on Safari 17.

Cardioid answered 8/7, 2023 at 1:55 Comment(0)
M
-3

Simon, I suppose there's a reason none of the other answers is accepted so far. Thus I believe this could be a Grails issue nevertheless - Especially if you're using the 'Resources Plugin'.

If your plugins provide a favicon (which - illogically - many do), they might override the one you desired to use - given yours is in a plugin itself.

If deleting the favicon from all your plugins temporary resolves the issue then you're very likely experiencing this:

http://jira.grails.org/browse/GPRESOURCES-134

Midcourse answered 5/1, 2012 at 12:46 Comment(0)
U
-3

Please follow below steps to change app icon:

  1. Add your .ico file in the project.
  2. Go to angular.json and in that "projects" -> "architect" -> "build" -> "options" -> "assets" and here make an entry for your icon file. Refer to the existing entry of favicon.ico to know how to do it.
  3. Go to index.html and update the path of the icon file. For example,

<link rel="icon" type="image/x-icon" href="abc.ico">

Alternatively, rename your icon file with favicon.ico and replace it in the directory.

  1. Restart the server.
  2. Hard refresh browser and you are good to go.
Unreadable answered 21/1, 2019 at 4:35 Comment(0)
M
-5

It may be useful to just a few people, but I had the same problem and discovered that it was related to file permessions, so I gave it a 777 permission and it worked, of course after you're sure the problem it's there, make sure to change back the permissions to safer values.

Metabolism answered 30/6, 2016 at 14:35 Comment(1)
777 is a lousy solution. Giving write access to everyone is extremely bad practice.Cesspool

© 2022 - 2024 — McMap. All rights reserved.