C
C
ChemAli2013-08-15 11:46:40
Google Chrome
ChemAli, 2013-08-15 11:46:40

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

5 answer(s)
R
Razario777, 2013-08-15
@Razario777

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.

I
Ilya Sevostyanov, 2013-08-15
@RUVATA

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.

E
EugeneOZ, 2013-08-15
@EugeneOZ

Yes. And not just chrome.
wiki.nginx.org/Drupal - see an example here of how not to dirty the logs with this.

R
Razario777, 2013-08-15
@Razario777

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.

C
charon, 2013-08-15
@charon

read about it on stackoverflow. A lot of letters, but in short, just put up with it. Not one, but another browser will always break exactly on /favicon.ico. It is recommended to disable logging of such requests at the web server level and just forget about it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question