Mobile app version of vmapp.org
Login or Join
Lee4591628

: Favicon 404 in access log, but favicon is there Going through 404 error on my site, I have noticed a bunch of problems with favicons: /apple-touch-icon-120x120.png /apple-touch-icon-120x120-precomposed.png

@Lee4591628

Posted in: #Favicon #Logging

Going through 404 error on my site, I have noticed a bunch of problems with favicons:

/apple-touch-icon-120x120.png
/apple-touch-icon-120x120-precomposed.png
/apple-touch-icon-152x152.png
/apple-touch-icon-152x152-precomposed.png
/apple-touch-icon-precomposed.png
/apple-touch-icon.png
/favicon.ico


Interesting part is that I have the following code on every page

<link rel="shortcut icon" href="/public/img/favicon.ico">
<link rel="apple-touch-icon image_src" href="/public/img/apple-big.png">


But I see that sometimes in the logs I see "GET /public/img/favicon.ico HTTP/1.1" 200 which means that icon is taken from correct location, but sometimes "GET /favicon.ico HTTP/1.1" 404.

I searched through the whole codebase trying to find where else favicon could be called, but with not luck. Any idea what might be wrong?

P.S. added user agents: "GET /favicon.ico HTTP/1.1" 404 409 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0"

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Lee4591628

1 Comments

Sorted by latest first Latest Oldest Best

 

@Angela700

It would be worth looking at the user-agent values for those requests causing the 404's. As previously asked/answered, browsers will normally follow the <link> location before any default request is made against the root folder of the site.

The error logs you are seeing are due to your file locations being in other directories. Most browsers will find them as they've parsed your HTML and located the appropriate <link> declaration, but others may not.

[EDIT/UPDATE FOR EXPLICIT ANSWER]
Move or redirect requests for your icons to the root folder so that the following resolve:

<link rel="shortcut icon" href="/favicon.ico">
<link rel="apple-touch-icon image_src" href="/apple-touch-icon-precomposed.png">


Then add/provision for the other requests as outlined here.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme