Reputation: 207
I created a favicon for a rails app I've built a month ago. Now I'm working on a new app without a particular favicon, yet every time I go to localhost:3000 the old favicon appears. I know it really doesn't matter and it won't appear in production but it bugs me. Can anyone explain why it keeps showing and how can I remove it?
Thanks.
Upvotes: 1
Views: 644
Reputation: 529
The reason is simple, the browser is being smart and caches the favicon as it associates it with the URL, i.e. http://localhost:3000
.
To test it in Chrome, just open http://localhost:3000
in an incognito window (CTRL+SHIFT+N) and you will not see the favicon there.
To remove the favicon, simply clear the browser cache.
Upvotes: 2
Reputation: 998
It appears in development on localhost:3000 because it got cached.if run your server on different port like 4000(rails s -p 4000) and access localhost:4000 then it won't show you the old favicon.
Upvotes: 0