session-pysogs icon indicating copy to clipboard operation
session-pysogs copied to clipboard

Prevent 404 requests to favicon.ico

Open slrslr opened this issue 1 year ago • 4 comments

Prevents failed request for favicon.ico resulting in 404 Not found error in server log lines (causing disk write and used space) and web browser requests.

Based on https://stackoverflow.com/a/38917888

slrslr avatar Mar 26 '23 11:03 slrslr

Can someone confirm whether this works for Safari? (There are comments in the referenced link that it does, but they are also quite old comments).

jagerman avatar Apr 21 '23 16:04 jagerman

Can someone confirm whether this works for Safari?

I have asked a Safari user if he sees any warnings or errors on developer console/network tab and he said: safari

slrslr avatar Apr 22 '23 18:04 slrslr

I tested Safari Version 16.0 (17614.1.25.9.10, 17614) on macOS, but the <head><link rel="icon" href="data:,"><head/> solution didn't work for me.

Note that browsers cache favicon.ico, so you need to make sure to clear the cache every time before testing:

https://oit.colorado.edu/tutorial/clear-web-browser-cache-safari

ghost avatar Apr 22 '23 18:04 ghost

Screenshot 2023-05-04 at 22 00 19

I was requested to test on MacOS and Safari, here's the result from the console.

Marky-N avatar May 04 '23 19:05 Marky-N