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.
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.
If you tried everything above and it still doesn’t work in IE, check your IIS settings if you are using a Windows Server. Make sure that the HTTP Headers > “Enable content expiration” setting, IS NOT SET to “Expire immediately”
精彩评论