Unable to Change Favicon with Express.js

I tried visiting the site in Safari for the first time (I normally use Chrome) and noticed that it was showing the correct favicon. I tried clearing my cache in Chrome again (twice) to no avail, but after more searching, I found that apparently favicons aren’t stored in the cache. I “refreshed my favicon” using the method described here and it worked!

Here’s the method (modified from the above link), in case the link goes dead:

  1. Open Chrome/the problematic browser
  2. Navigate to the favicon.ico file directly, e.g. http://localhost:3000/favicon.ico
  3. Refresh the favicon.ico URL by pressing F5 or the appropriate browser Refresh (Reload) button
  4. Close the browser and open your website – voila, your favicon has been updated!

Leave a Comment