Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate blank favicon programatically?

I have no favicon on my web site so there are numerous of failed log entry and I decided to rewrite favicon.ico get request to a page that will generate blank file and return it to a browser?

How do you think, is it possible? Could you please help me a bit how to do that?

like image 634
abatishchev Avatar asked Apr 08 '26 09:04

abatishchev


2 Answers

If you don't want to create a physical file, I would suggest adding

<link href="data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQEAYAAABPYyMiAAAABmJLR0T///////8JWPfcAAAACXBIWXMAAABIAAAASABGyWs+AAAAF0lEQVRIx2NgGAWjYBSMglEwCkbBSAcACBAAAeaR9cIAAAAASUVORK5CYII=" rel="icon" type="image/x-icon" />

in the head section

Source http://davidwalsh.name/blank-favicon

like image 52
Kumar Avatar answered Apr 10 '26 23:04

Kumar


You can use the minimal data URI.

<link rel="icon" href="data:," />

From https://en.wikipedia.org/wiki/Data_URI_scheme

The minimal data URI is data:,, consisting of the scheme, no media-type, and zero-length data.

like image 32
Carter Medlin Avatar answered Apr 11 '26 00:04

Carter Medlin