Answer the question
In order to leave comments, you need to log in
Why is Chrome requesting favicon.ico where it doesn't exist and didn't exist?
Raised a bare vps + lamp for experiments. I check the work with Chrome and immediately favicon.ico requests appear in the logs and, accordingly, in the error logs, too, because no one created this file and did not refer to it.
I looked at one of the sites - the entire error log is littered with /favicon.ico 404 requests, although it lies in /images/favicon.ico and in the page code the path is specified in the subdirectory.
Chrome by default looks for this file and will go on forever until it finds it?
- Do you have /favicon.ico?
- Not.
- What if I find it?
Answer the question
In order to leave comments, you need to log in
And how, sorry, chrome should know that the file does not exist if it does not request it?
He should not look for it in all directories in a row, the file should be at the root, so there is no point in putting images in subimages and other directories.
The search in the favicon.ico root directory is carried out if the location is not explicitly specified, through the use of the tag
<link rel="icon" type="image/png" href="/someimage.png" />
Check if your indication is processed, you may have made a mistake / typo in the markup. Look at the console in your browser, there may be some errors there. etc.
Yes. And not just chrome.
wiki.nginx.org/Drupal - see an example here of how not to dirty the logs with this.
Look, I recently logged requests to the site on ASP.MVC
, just opened the page through chrome: The first call is
to
/favicon.ico logically, it doesn't even look to see if you have a link rel="shortcut icon", because first tries to load the icon, and only then the page in which this attribute is specified.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question