Is there some directive I could use in my HTML to tell the browser not to ask for the favicon?
By default, your browser will use the favicon in the same folder with your html file, so removing your link tag will do nothing. You need to move the favicon elsewhere or delete it. Then, if it stills shows up, clear your cache and go to the icon to see the new one.
You don't need to, no, but some browsers will request /favicon. ico automatically, so the errors are pretty much unavoidable.
Conclusion. As you can see, having a favicon on your website is crucial. Not only does it make your site distinguishable on browser tabs, but it also gives a professional look to your website. You can add it automatically by uploading a .
No, I don't think there is. From Wikipedia:
Most web browsers do not require any HTML to retrieve a favicon that conforms to the de facto file name and type (favicon.ico) located in the web site's root. If no favicon link is detected upon HTML page load completion and no previous site visits are recorded in the browser's history, a favicon.ico is requested automatically.[8]
The only thing you could do is explicitly point the browser to a different location (that for example could return a 204 no content
)
<link rel="shortcut icon" href="http://www.example.com/my_empty_resource" />
Add this line.
<link rel="icon" href="data:,">
This assigns an empty data URL to the favicon’s element which specifies the location of the external resource. This trick stops the user’s browser from sending an automatic HTTP request for the favicon.
This has some more details
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With