Favicon the rails way

I followed the recommendations I found here on stackOverflow and added the following to my /application.html.erb section of my layouts:

<%= favicon_link_tag '/favicon.ico' %> 

favicon.ico is in my shared folder I also tried putting it in the "Resources / Images" folder

I restarted the rails server (local development environment on MAC, Rails 3.2.xxx), but I do not see the icon. Any ideas?

+4
source share
1 answer

Three things to check:

  • Is favicon_link_tag displayed favicon_link_tag in the HTML source of your document?

  • Does favicon.ico url indicate that it points to a valid file, is this path incorrect or may you have a problem with this question?

  • Is the browser cache updated? In most browsers, do this by holding Ctrl or Shift while reloading the website. See also: Wikipedia: cache bypass

+6
source

Source: https://habr.com/ru/post/1442198/


All Articles