Search code examples
phpfavicon

favicon.ico not working on chrome, firefox. working on a few pages in IE


i have a favicon.ico in my webroot folder according to this piece of code

<link rel="icon" href="<?php echo $this->webroot;?>favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="<?php echo $this->webroot;?>favicon.ico" type="image/x-icon" />

and i use this in my header to make it appear on all the pages.

<?php echo $html->meta('icon', 'favicon.ico'); ?>

The site am working on is -----> this.

What can possibly be wrong ? It works in 3 pages on IE. On firefox and chrome, it works only for homepage, not others.

Please let me know what i should do.


Solution

  • You ought to just use href="/favicon.ico". If you notice the source of http://www.movend.com/developers/, for example, your reference to favicon.ico resolves to http://www.movend.com/developers/favicon.ico, which is a 404 error page.