Favicon in opera and a2

2005/02/09 by Lassi A. Liikkanen

Shortcut icon and Apache 2 server
Potential problems with Opera and Internet Explorer

I had some difficulties gettin the shortcut icon, a.k.a. favicon, to work properly on IE and Opera, whereas Mozilla family was not affected. As you probably to know it should work with code like this:

When placed in your HTML/XHTML document's HTML Head. But it didn't do so initially when I tried it with IE (6) and Opera (6,7 and 8). Took some time to figure out what the problem is. Along the process I found out e.g. that Opera can be picky about how the rel property is written. I found the first letter upper case -form presented above to work best.

Problem #1

The actual reason was missing MIME type declaration for image/x-icon in the Apache configuration. It is easily fixed either in Apache configuration or in your OS's MIME table. Below is the fix to be used httpd.conf

AddType image/x-icon .ico

Then reload your server and the shortcut icon will now work in Opera in IE.

Problem #2

I initially tried something like this:

Which doesn't work for Opera (7) but works for Firefox. Opera appareantly only accepts favicon.ico for the icon filename.

Conclusion

If you have problems with the shortcut icon in Opera, ensure that
1) The server sends the correct MIME type for the icon
2) You are'nt trying to rename the icon file, as Opera can't handle it

Related content:
Comparison of blogging platforms for advertising options, 2015/12/15

Liikkanen and Sandstrom (2013) To be or not to be real? Investigating the authenticity of YouTube views. Technical report from HIIT, Aalto University, Finland, 2013/10/21

Bash Shell Script to resolve destinations of T.Co hyperlinks created by Twitter to proper URL , 2013/10/02

No comments for this page
Add comment | Show all comments

Name*:
Email*:
Your email will not be shown publicly or disclosed to third parties, it is used to validate messages
Location (City, Country):
* This information must be provided

Keywords: [www-techniques] Document's status: Ok (Document dates explained)

This document created: 2005/02/05
Modified: 2005/02/09
Published: 2005/02/09


This document's permanent URI (linking):
http://iki.fi/lassial/guides/www-techniques/050209-favicon_in_opera_and_a2

© Lassi A. Liikkanen 2005 - 2016. All rights reserved.
^Top of the Page^

*Change layout:
Printable printable
Large text

Myydään:

@lassial Twitter feed: