infamous favicon.ico

1,519 views
Skip to first unread message

dineshv

unread,
May 2, 2008, 10:32:08 PM5/2/08
to web.py
I'm still in development and using the web.py local host and suddenly
in the past few days I get /favicon.ico 404 errors. Here is some
output:

C:\... \py>python ac.py 127.0.0.1:8080
http://127.0.0.1:8080/
localhost - - [02/May/2008 19:18:17] "GET / HTTP/1.1" 200 -
localhost - - [02/May/2008 19:18:59] "GET /static/graphics/logo_ac-
top.gif HTTP/1.1" 200 -
localhost - - [02/May/2008 19:18:59] "GET /favicon.ico HTTP/1.1" 404 -
localhost - - [02/May/2008 19:18:59] "GET /favicon.ico HTTP/1.1" 404 -

Any ideas what I can do?

Justin Davis

unread,
May 2, 2008, 11:57:35 PM5/2/08
to web.py
The browser assumes that your favicon file will be located at /
facicon.ico, but you haven't provided one there. A good way to fix
this is to put this in the <head> part of your html:

<link rel="shorcut icon" href="/static/favicon.ico"/>

And then create an icon file in your static folder, called
favicon.ico. It's a funny image format -- check out http://www.nongnu.org/icoutils/
to learn more about how to make them.

Cheers,
Justin

On May 2, 10:32 pm, dineshv <dineshbvad...@hotmail.com> wrote:
> I'm still in development and using the web.py local host and suddenly
> in the past few days I get /favicon.ico 404 errors.  Here is some
> output:
>
> C:\... \py>python ac.py 127.0.0.1:8080http://127.0.0.1:8080/

flywood

unread,
May 5, 2008, 10:38:33 PM5/5/08
to web.py
I met same problem here. how can I disable this action which getting
the favicon.ico file?

On 5月3日, 上午11时57分, Justin Davis <jedavi...@gmail.com> wrote:
> The browser assumes that your favicon file will be located at /
> facicon.ico, but you haven't provided one there. A good way to fix
> this is to put this in the <head> part of your html:
>
> <link rel="shorcut icon" href="/static/favicon.ico"/>
>
> And then create an icon file in your static folder, called
> favicon.ico. It's a funny image format -- check outhttp://www.nongnu.org/icoutils/

Yoan Blanc

unread,
May 6, 2008, 2:25:11 AM5/6/08
to we...@googlegroups.com
You cannot.

"It's a necessary evil because even if you don't care about it the
browser will still request it, so it's better not to respond with a
404 Not Found." --
http://developer.yahoo.com/performance/rules.html#favicon

-- Yoan

bubblboy

unread,
May 10, 2008, 7:58:01 AM5/10/08
to we...@googlegroups.com

I have been seeing the same problem (web.py unrelated but still
interesting) and I have to add that ignoring it will make many browsers
behave like mindless goblins hammering the iron portals of your shiny
webfortress. I often see as much as 4 GET /favicon.ico 404 successive
log entries in one second from Firefox. I never experimented with
setting a cache-header but I think it would be worth experimenting with
if useless connections are really an issue for you :) hopefully they
will give up for a while after the first try (the problem is that when
they bookmark your site they continue to hammer your /favicon.ico every
now and then to see if that icon changed, even when not visiting it).

This comes from an age-old tradition, btw, that favicons were located at
/favicon.ico and in a certain format (image/vnd.microsoft.icon---yes,
they invented it). In this day and time I doubt if any browser still
does not support the newer <link rel="shortcut icon" ...> but of course
they all want to be backwards compatible and when such a clause is
missing from your document they hope maybe you're still using the old
way of serving favicons (microsoft's original way). Luckily pretty much
all browsers now also support other image types than vnd.microsoft.icon
(such as type="image/gif" or even png).

Greets,

b^4

Reply all
Reply to author
Forward
0 new messages