I have a website that doesn’t have/need a favicon.
Is there a way to instruct the browser not to waste a request looking for /favicon.ico ?
I don’t mean filtering logs, but something client-side, like this:
<link rel="shortcut icon" href="about:blank" />
That appears to work, but I’m not in a position to do comprehensive tests, (and search engines are being unhelpful).
Can anyone confirm if this is a valid method, or provide a suitable alternative?
Update: On further investigation, that doesn’t work (at least not with Chromium 18 on a non-local domain). A partial solution is using a
data: URL to serve a base64 blank image, (example from here):
<link href="data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQEAYAAABPYyMiAAAABmJLR0T///////8JWPfcAAAACXBIWXMAAABIAAAASABGyWs+AAAAF0lEQVRIx2NgGAWjYBSMglEwCkbBSAcACBAAAeaR9cIAAAAASUVORK5CYII=" rel="icon" type="image/x-icon" />
This is working, but has two down-sides:
- It will presumably fail in browsers that don’t support data URLs.
- It results in no favicon at all – i.e. it hides the browser default icon.