li-raz
li-raz

Reputation: 1696

serving favicon.ico from node.js

I have built a small node server using express and I want to serve index.html which contains angular app. How ever the browser sends GET request for favicon.ico. I have installed serve-favicon, however still it looks for physical file. Is there a way to override it? or from where can I find such file

Upvotes: 3

Views: 8772

Answers (2)

Deto
Deto

Reputation: 29

You can use this site to get free favicon.ico

Then add your favorite favicon.ico to your html .

<link rel="icon" type="image/png" href="../images/favicon.ico" />

Upvotes: -1

Ryan
Ryan

Reputation: 5973

The recommended way is actually just to use a link tag in your index.html:

<link rel="icon" href="/img/favicon.png">

Just change the href to link to an img in your public folder and you're good to go.

http://www.w3.org/2005/10/howto-favicon

Upvotes: 5

Related Questions