Skip to main content
sysadmin.my

Back to all posts

Prevent favicon.ico Requests

Published on by dab · 1 min read

Table of Contents

Show more

In most web browsers, loading a page will trigger a(nother) HTTP request to /favicon.ico, resulting in Response 404 and console errors if the server doesn’t explicitly handle that route.

If you don’t need or want this behavior on your page, you can load a “blank” favicon inline by putting the following inside the <head> tag:

<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'/>">