Jump to content
xisto Community
Sign in to follow this  
iGuest

All About The Fav Icon

Recommended Posts

Well, I am not sure, but the use of ./ is current dir ../ parent dir and / is root, atleast browsers search like that, but I might be wrong. :huh:

Share this post


Link to post
Share on other sites

I don't know why, but whenever I have tried ../ it has never worked, especially when calling images from CSS.Thanks about the / = root. It is more than likely that, and you have probably saved me a whole deal of trouble.

Share this post


Link to post
Share on other sites

Here's a tutorial I wrote last year on this, I also created the favicon you see here on Xisto.

This tutorial also has answers of getting IE to show a favicon but the method is only a small trick, and not permanent. It's further down the tutorial in one of my other posts, on it.

Add Favicon To Your Site

Another thing to note, there is no mime-type image/ico, the correct mime-type is image/x-icon.

When specifying the location, we can use absolute URLs or relative URIs, it's best to use URIs since it could be confused for an address you could visit.


Cheers,


MC

Share this post


Link to post
Share on other sites

So then the correct link tag would be as follows:

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

if I have followed the posts correctly?

Share this post


Link to post
Share on other sites

So then the correct link tag would be as follows:

 

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

if I have followed the posts correctly?

1064334828[/snapback]


Yes, the correct type or more correctly mime-type is image/x-icon and that link line is indeed correct. I would question the URI used though, "/images/favicon.ico" or "images/favicon.ico", I would not usually do the former way, and opt for the second method. Otherwise I would use a full URL reference.

 

Now IE has been known to disregard the type and do what is known as mime-type detection on anything it encounters, usually it does it correctly, but when you use text/plain to display plain text of HTML elements etc, it incorrectly identifies the document as text/html even if you specified the document as text/plain, so it will render your document as HTML. I'm not sure whether they fixed this in IE7 but I think they still rely on their mime-type detection, which you can turn off in IE6 if you want to, part of their content security.

 

Cheers,

 

 

MC

Share this post


Link to post
Share on other sites

Thanks for the response.So, ratherthan the "images/favicon", you would use domain.com/images/favicon/?

 

Is that what you mean?

Share this post


Link to post
Share on other sites

I would use "image/favicon.ico" and not "/image/favicon.ico" but it's totally up to you, except "/image/favicon.ico" would most likely be interpretted as

 

domain.com/image/favicon.ico

 

http://forums.xisto.com/

 

when the abosolute URI is referenced, and you can see that it'd contain an additional forward slash after the domain. This won't cause problems though.

Cheers,


MC



Share this post


Link to post
Share on other sites

Hey, All this help and info is superb. Thanks to all of you who so freely give your time and knowledge to assist others. I wish more people would do it more often.I have followed all the instructions here and in the other Tutorial and have a few additional questions. first: does png format work favourably in most browsers? Or is it reccomended to have it converted to ico format? Any opinions?second: I have an iMAC running IE 5 point something under OS 9.1 and the favicon doesn't seem to want to show up. Is it an IE bug or an iMac bug? Does anyone know of a hack? or is there one? I tried the drag and drop, but it didn't seem to work for the site I was on.Thanks.

Share this post


Link to post
Share on other sites

Well, I'm glad you followed the tutorials, unfortunately the developers for IE5 on Mac were not the same developers of IE5 on Windows, hardly anything was shared between the two.

Also IE will no longer be developed for Mac anymore, so support and updates will probably stop soon.

The intended use of Favourite Icons, was to store an Icon in your Favourites Folder. Once you have stored it (bookmarked it), the Icon was to appear next to your favourites as well as in the Address Bar. This was the only time it would show, but someone, I'm not sure who, thought why not show it anyways, without needing to bookmark it.

I'm not sure whether IE5 on Mac did implement the Favourite Icon or not. Maybe you'd like to give Safari Web Browser a go? I know it supports it.

IE is strange, they came up with the favicon, but for some reason, their support for it seems broken now.

I think it's safe to say png format is supported by most modern browsers, what you can do is have two images as favicon, and it comes down to what the browser picks to display, you could test which one it picks by making the png format one a different picture to the ico format one and seeing which one it chooses.

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

You can add as many <link rel="icon"... as you like with different image types, or image names, etc.

The size still remains 16 x 16, using a larger size, will most likely be reduced, or in the odd occassion, not displayed at all.


Cheers,


MC

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.