express.favicon()

Showing 1-6 of 6 messages
express.favicon() Rob Faraj 3/30/11 3:28 PM
Can anyone help me figure out what express.favicon() actually does? 

I see this nifty light and dark blue favicon.ico in my browser after using this. How can I change it to be my nifty favicon.ico file? 
Re: [Express-js] express.favicon() tjholowaychuk 3/30/11 3:35 PM
it's a fast path to a favicon, typically one has static() lower in the stack so that routes can intercept if needed, however this is rarely needed for a favicon. favicon(__dirname + '/path/to/favicon.ico')

-- 
TJ Holowaychuk

On Wednesday, March 30, 2011 at 3:28 PM, Rob Faraj wrote:

Can anyone help me figure out what express.favicon() actually does? 

I see this nifty light and dark blue favicon.ico in my browser after using this. How can I change it to be my nifty favicon.ico file? 

--
You received this message because you are subscribed to the Google Groups "Express" group.
To post to this group, send email to expre...@googlegroups.com.
To unsubscribe from this group, send email to express-js+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/express-js?hl=en.

Re: [Express-js] express.favicon() tjholowaychuk 3/30/11 3:35 PM
Re: [Express-js] express.favicon() Rob Faraj 3/30/11 4:37 PM
Thanks TJ. I should have looked in connect all along.

If anyone else has the same question, here is what I put to get it to work. The maxAge is a cache-control directive in milliseconds.

app.use(express.favicon(__dirname + '/public/favicon.ico', { maxAge: 2592000000 }));
Re: [Express-js] express.favicon() Benjamin Fisher 8/7/12 11:54 PM
Thanx so much for posting the solution here. One other quick point though; if the regular Express favicon is showing you will need to clear the browser cache before it will change to a newly minted favicon. 
Re: express.favicon() dnigh 1/5/13 10:31 PM
check also http://stackoverflow.com/a/14179888/976647

the order of the app.use in the configuration file is important


On Thursday, March 31, 2011 12:28:00 AM UTC+2, Rob Faraj wrote:
Can anyone help me figure out what express.favicon() actually does? 

I see this nifty light and dark blue favicon.ico in my browser after using this. How can I change it to be my nifty favicon.ico file?