I can't get my favicon to show up. It's called favicon.ico
and inside of public directory (folder). My development log shows no problems with the favicon. I put the link in my application layout:
<!DOCTYPE html>
<html>
<head>
<%= csrf_meta_tag %>
<%= favicon_link_tag "/favicon.ico" %>
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "application" %>
</head>
<body>
<%= yield %>
</body>
</html>
But its still not showing up in Firefox. I cleared my cache with Firefox and I also tried <%= favicon_link_tag %>
too. I haven't tried production but can you even see it in localhost? What am I missing?
UPDATE
So its showing up in Chrome but not Firefox. Any idea why?
If you suspect caching is the problem, you could also trick the browser into loading the new icon by adding a parameter to the filepath.
Instead of
favicon_link_tag "/favicon.ico"
Use
favicon_link_tag "/favicon.ico?1"
Clear the cache again in Firefox (I usually just clear everything) and then check out the network traffic when you load your page. Make sure that favicon.ico is being requested. If not, then it's probably being cached somewhere. I had lots of issues with this the other day but after a couple of cache clears it suddenly started working.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With