To set a webpage’s favicon to the browser default, which is typically a globe icon, simply include <link rel="icon" href="data:,">
in the <head>
section.
To be completely honest, I don’t know why this works (or at least, it works in recent versions of Firefox and Chrome), but, here’s my guess:
- The browser reads
<link rel="icon">
, meaning it knows it’s been explicitly told to display a favicon image, which skips the usual logic for not showing a favicon (like when<link rel="icon">
is missing). - However, the data attribute contains nothing; it’s a “null favicon”.
- Credit to ‘reese’ for the name “null favicon”.
- Since the browser has been told to display a favicon, but it hasn’t received a valid image for the favicon, the browser uses the default globe icon as a fallback.