class ToDeskHandler(BaseHandler):
def get(self):
content = '''[InternetShortcut]
URL=http://idealclub.sinaapp.com
IDList=
IconFile=http://idealclub.sinaapp.com/favicon.ico
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2'''
self.set_header("Content-Type","application/octet-stream")
self.set_header("Content-Disposition","attachment; filename=饭否.url")
self.write(content)
1.请将favicon.ico文件放置在网站根目录下。
2.用ie访问网站,将图标缓存至本地。
这样就可以在快捷方式上显示网站图标了。