Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any performance difference between http 304 and 404?

We have a web site that does not have a favourite icon favicon.

Therefore, we get a lot of http 404 errors for the file favicon.ico.

For the functionality of the web site it does not make a difference.

But I was wondering if the system uses more time looking for a file that is not there, rather than returning a 304 not modified?

At max load we have ca. 15,000 concurrent connections across all frontend servers.

like image 246
Shiraz Bhaiji Avatar asked Dec 21 '22 13:12

Shiraz Bhaiji


1 Answers

No, the performance difference is insignificant - if you don't want to have a favicon, I'd suggest creating a 0-byte /favicon.ico : the logs will stop complaining, and the browsers will behave as if there's no favicon.

Also, you could set a far future Expires header for your favicon - that way, the clients will only request it once, further reducing the load.

like image 168
Piskvor left the building Avatar answered Dec 30 '22 09:12

Piskvor left the building