How to remove favicon.ico and favicon.gif (0 kb)


#1

It seems that DreamHost is auto-creating a favicon.ico and a favicon.gif (both with 0 kb). I removed them, but next time they are there again.

I understand, that it might be useful for most ppl., who forget to upload a Favicon, because it would generate so many 404 errors.

Is there any way to remove these empty default favicons? (without overriding them!) I don’t want any favicon.[gif|ico] there.


#2

Please see this message from DreamHost:

DreamHost Status - favicon.ico, favicon.gif and robots.txt update

If you want a 404 served for the files, use mod_rewrite or RedirectMatch.


#3

Thanks for the link, Atropos7. I searched only for pages at *.dreamhost.com, did not thought of *.dreamhoststatus.com.

So, there is no way to get rid of these? Hum, silly.


#4

You’d have to create a cronjob that runs hourly or so that removes them.
/bin/rm ~/example.com/favicon*


#5

[quote=“hldf, post:1, topic:53846”]Is there any way to remove these empty default favicons? (without overriding them!) I don’t want any favicon.[gif|ico] there.
[/quote]

Which of course begs the question why? Does having the file on your site cause a problem?


#6

No problem. Well, ehrm, maybe …


I like it clean and well arranged.
I don’t like proprietary formats like GIF or – even worse – ICO.
I use a PNG for my favicon.
I don’t want to have to create/convert a GIF and ICO variant of my PNG favicon.

Looking for a favicon.ico in site root is bullshit.
1.) There is a standardized way of referring to the favicon of the site with the meta element - so you can place it where-ever you like.
2.) ICO is a Microsoft format. No good support with free software.

I don’t want any bot/agent looking for /favicon.ico to find one.
I don’t want it to find an empty favicon.ico.
I don’t want it to find the favicon.ico as a copy of my real favicon.png.
I don’t want it to get redirected to /img/favicon.png or so.
I just want them to find NO favicon.
They shall use the correct way of parsing the meta element. If you keep them giving what they want, they won’t change.

And maybe there might be problems with some multi-site functions of a CMS. When you set a favicon for each subsite with the correct way (meta element), there is still this dreamhost-created favicon.[ico|gif] in site root. So some agents, which might look for BOTH methods (favicon.ico in site root -or- favicon referred to in meta element) might try the favicon.ico variant first and find this empty favicon. I couldn’t even fill this favicon.ico with my real favicon, because I need several different favicons (because of multi-site).


#7

hldf, every client that we’ve tested has treated an empty favicon.ico identically to a 404 response. While I’ll certainly agree that the protocol for locating it (as well as the format!) are suboptimal, that won’t stop most clients from looking for a file there. Placing an empty file there is computationally much less expensive than potentially generating a dynamic 404 page, which a lot of CMSes will do by default.

Generating favicon files from any sort of dynamic script is a very bad idea, as many agents (especially older browsers) will request it far more often than necessary. Don’t do it.