简体   繁体   中英

How do I remove the favicon from my rails app

I have a rails 3.2.6 app and I am using the asset pipeline and I have no favicon.ico but for some reason my app keeps looking for it which is causing problems

Started GET "/favicon.ico" for 127.0.0.1 at 2012-06-18 16:20:44 -0400
Processing by PlaylistsController#index as 

I have no idea what is causing this to get called...there is nothing in my app at all that has the text favicon

My question is, Is there a place in rails that i can tell this to stop?

Here is my head information just in case

<head>
  <title>Playlist</title>
  <meta content='width=device-width, initial-scale=1.0' name='viewport'>
  <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
  <![endif]-->
  <link href="/assets/application.css?body=1" media="all" rel="stylesheet" type="text/css" />
    <link href="/assets/common.css?body=1" media="all" rel="stylesheet" type="text/css" />
    <link href="/assets/app.css?body=1" media="all" rel="stylesheet" type="text/css" />
    <link href="/assets/bootstrap_and_overrides.css?body=1" media="all" rel="stylesheet" type="text/css" />
    <link href="/assets/jquery-ui-1.8.21.custom.css?body=1" media="all" rel="stylesheet" type="text/css" />
    <link href="/assets/main.css?body=1" media="all" rel="stylesheet" type="text/css" />
    <link href="/assets/dataTables/jquery.dataTables.css?body=1" media="all" rel="stylesheet" type="text/css" />
    <link href="/assets/dataTables/jquery.dataTables.bootstrap.css?body=1" media="all" rel="stylesheet" type="text/css" />
  <script src="/assets/jquery.js?body=1" type="text/javascript"></script>
    <script src="/assets/jquery_ujs.js?body=1" type="text/javascript"></script>
    <script src="/assets/dataTables/jquery.dataTables.js?body=1" type="text/javascript"></script>
    <script src="/assets/dataTables/jquery.dataTables.bootstrap.js?body=1" type="text/javascript"></script>
    <script src="/assets/jquery-ui.js?body=1" type="text/javascript"></script>
    <script src="/assets/bootstrap.js?body=1" type="text/javascript"></script>
    <script src="/assets/editable.js?body=1" type="text/javascript"></script>
    <script src="/assets/mutils.js?body=1" type="text/javascript"></script>
    <script src="/assets/custom.js?body=1" type="text/javascript"></script>
    <script src="/assets/application.js?body=1" type="text/javascript"></script>
  <link href="/assets/datatables.css?body=1" media="screen" rel="stylesheet" type="text/css" />
  <meta content="authenticity_token" name="csrf-param" />
    <meta content="Pccg3siV8wY7LftMfpyi5rgFArjehQb7g5o1BF7QL1I=" name="csrf-token" />

No, there's not.

All current, popular browsers (except Seamonkey) make a GET request to /favicon.ico themselves, and there's no way to stop them from doing so. If it doesn't exist, they will still request it, and continue to request it; nothing about your application or server can change that.

Rails includes a favicon.ico file with a size of 0 in the public folder by default so that instead of sending an HTML 404 page that will never be seen in response, a zero content length response is sent, which (under most production configurations) will be cached and will be faster as it won't have to be processed by Ruby.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM