Prevent favicon requests: the fastest way to stop the browser from requesting favicon.ico

Опубликовано: 15 Ноябрь 2024
на канале: Dave Hollingworth
9,105
215

When developing HTML, sometimes you'll see an additional request for "favicon.ico" that returns a 404 response.

You can't stop the browser from requesting this file, it does it automatically.

The quickest way to avoid this is to add one line of code to the head element of your HTML.

Please consider supporting my channel:
☕ https://ko-fi.com/davehollingworth

Code shown in the video:
https://gist.github.com/daveh/9c533e8...

00:00 favicon.ico 404
00:21 code to prevent it

#html #shorts