Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get rid of this routing error related to favicon.ico

Any ideas on how to get rid of this error.

Started GET "/favicon.ico" for 132.175.48.49 at 2012-12-18 11:20:59 +0000

ActionController::RoutingError (No route matches [GET] "/favicon.ico"):
  actionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  actionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.8) lib/rails/rack/logger.rb:26:in `call_app'
  railties (3.2.8) lib/rails/rack/logger.rb:16:in `call'
  actionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:in `call'
  rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
  rack (1.4.1) lib/rack/runtime.rb:17:in `call'
like image 389
Joe Avatar asked Dec 18 '12 17:12

Joe


People also ask

How do I stop favicon errors?

adding <link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo="> seems to solve the issue. If I got it right, I can open data:image/png;base64,iVBORw0KGgo= in browser, save it as favicon. ico aka. empty PNG file and store it in website root.

How do I remove favicon ICO?

Clear your browser's cache. make sure favicon. ico has physically been deleted from the root, if it was there in the first place. Some browsers will search for it there even if it is not mentioned in your HTML.

Why does the browser request favicon Ico?

This known as the 'favicon. ico' and is typically fetched from website.com/favicon.ico. Your browser will automatically request it when browsing to different sites. If your browser receives a valid favicon.

What is a favicon Ico request?

The favicon. ico file is a small graphic icon that is used by some browsers (including Microsoft Internet Explorer and Mozilla Firefox) to enhance the display of address bar information and "favorites" bookmark lists.


1 Answers

You probably have such a line (most likely in your application.html.erb, or some other template):

<link href="/favicon.ico" rel="shortcut icon" />

If you do, just change it to:

<link href="/assets/favicon.ico" rel="shortcut icon" />
like image 171
davidrac Avatar answered Nov 01 '22 04:11

davidrac