emoticon favicon to prevent error:
var favicon = new Buffer('AAABAAEAEBAQAAAAAAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAgAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAA/4QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEREQAAAAAAEAAAEAAAAAEAAAABAAAAEAAAAAAQAAAQAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAA//8AAP//AAD8HwAA++8AAPf3AADv+wAA7/sAAP//AAD//wAA+98AAP//AAD//wAA//8AAP//AAD//wAA', 'base64'); app.get("/favicon.ico", function(req, res) { res.statusCode = 200; res.setHeader('Content-Length', favicon.length); res.setHeader('Content-Type', 'image/x-icon'); res.setHeader("Cache-Control", "public, max-age=2592000"); / 4QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEREQAAAAAAEAAAEAAAAAEAAAABAAAAEAAAAAAQAAAQAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD // wAA // 8AAP // AAD8HwAA ++ 8AAPf3AADv + wAA7 / sAAP // AAD // wAA + 98AAP // AAD // wAA // 8AAP // AAD // wAA' var favicon = new Buffer('AAABAAEAEBAQAAAAAAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAgAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAA/4QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEREQAAAAAAEAAAEAAAAAEAAAABAAAAEAAAAAAQAAAQAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAA//8AAP//AAD8HwAA++8AAPf3AADv+wAA7/sAAP//AAD//wAA+98AAP//AAD//wAA//8AAP//AAD//wAA', 'base64'); app.get("/favicon.ico", function(req, res) { res.statusCode = 200; res.setHeader('Content-Length', favicon.length); res.setHeader('Content-Type', 'image/x-icon'); res.setHeader("Cache-Control", "public, max-age=2592000");
to change the icon in the code above
create an icon, perhaps here: http://www.favicon.cc/ or here: http://favicon-generator.org
convert it to base64, maybe here: http://base64converter.com/
then replace icon 64 value
general information on how to create a personalized fav icon
the icons are created using Photoshop or Inkscape, possibly inkscape, and then Photoshop to adjust the brightness and color correction (in the image settings menu →).
for the goto quick icon http://www.clker.com/ and select some vector clips and load as svg. then bring it to inkscape and change the colors or delete the parts, maybe add something from another image in the vector clip art, then for export select the parts to export and click the file> export, select a size, for example 16x16 for favicon or 32x32, for further 128x128 or 256x256 editing. The ico package can have several icon sizes inside. it may have a 16x16 pixel fav icon of high quality icon for linking to a website.
it is possible to improve imaage in Photoshop. like a vibrating round circular mask, whatever.
then upload this image to one of the sites that generate the icons. there are also programs for windows for editing icons (search as a “window icon editor”, specify how to create two images of different sizes inside the same icon).
to add an icon to the website. just put favicon.ico in the file in the root folder of the domain. for example, in nodejs in a shared folder that links static files. it should not be anything special, like the code above a simple file.