Why is my favicon not working on server but is working locally?

Old question but for anyone who experienced the same issue as me..

Spent about an hour trying to figure out why i was experiencing the same problem. Clearing history, updating code didnt work.

Restarted chrome browser and worked straight away ahah


Just upload the favicon to your root directory and give it the name "favicon.ico". By putting it in your root directory, you'll have a default favicon for all the pages in your domain.

Depending on the browser you use, you can add the following two lines into the head section of your pages.

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

Make an PNG file and set it as the favicon in an index.html page so the cache is overwritten: <html><head><link rel='icon' type='image/png' href='favicon.png' /></head></html>

It works.