node.js - What is the use to serve favicon from server -


i have doubt regarding favicon, can add favicon directly in html file following code.

<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" /> 

i have tried above code, it's working fine. have seen there modules in npm server favicon images. if add through html, why have use modules serve.

for case of serve-favicon module:

why use module?

  • user agents request favicon.ico , indiscriminately, may wish exclude these requests logs using middleware before logger middleware.
  • this module caches icon in memory improve performance skipping disk access.
  • this module provides etag based on contents of icon, rather file system properties.
  • this module serve compatible content-type.

Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -