the tornado server didn't do the favicon.ico by default,so i always get the info like these
[W 130626 10:38:16 web:1514] 404 GET /favicon.ico (192.168.1.57) 0.57ms
i use the web.staticfilehandler in various way include the source's example,and couldn't get it work, i got things work like this below.
handlers = [
(r'/favicon.ico', tornado.web.StaticFileHandler,dict(url='/static/favicon.ico',permanent=False)),
(r'/static/(.*)', tornado.web.StaticFileHandler, {"path": "plserver"}),
]
i felt so dump,i have to redirect it and couldn't sure it will work on web page in real world.
And I changed it to this one, this time I've got what I want
I got the answer while i wrote the post.
I put the favicon.ico in the
.\static\
, and add following code to html.it would be generated like this:
That's all.