Forum Moderators: open

Message Too Old, No Replies

How do I get the small icon next to my url?

This is so simple I'm so embarrassed to ask

         

eaglepi

10:55 pm on Dec 19, 2004 (gmt 0)

10+ Year Member



How do I make it so when someone types my url they see a small icon next to it as they do with this site?

Sanenet

11:03 pm on Dec 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Search Google for "favicon" for an icon maker software.

Basically it's a 16x16 pixel bitmap in 16 colours, you could make it in Paint.

kodaks

11:04 pm on Dec 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's called a favicon, and it can be easily generated (free) by visiting:
[chami.com...]

Sanenet

11:05 pm on Dec 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Basically its a 16x16 pixel, 16 bit colour image saved as "favicon.ico" in the root of your webserver.

Google "favicon" for software to create it (you could use paint to create a bitmap, and rename it, but I believe this can create errors under non MS platforms).

Also, [msdn.microsoft.com...] .

dvduval

11:05 pm on Dec 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How come they rarely display in Internet Explorer, but always display in Firefox?

TheDoctor

11:34 pm on Dec 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



IE keeps a copy of the favicon in your cache. When it gets flushed out of the cache to make room for newer things from sites you've visited more recently, IE forgets about it. It does not refresh it when next you visit the site.

Firefox doesn't forget about it, and will refersh the icon if it has changed (IE nevers does this, either).

msr986

11:39 pm on Dec 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> How come they rarely display in Internet Explorer, but always display in Firefox?

IE only displays them in the address bar after you bookmark a page.

FF displays them in the address bar without bookmarking.

nzmatt

12:02 am on Dec 20, 2004 (gmt 0)

10+ Year Member



Is there code to do this without favicon, just with a jpg or gif?

nzmatt

12:09 am on Dec 20, 2004 (gmt 0)

10+ Year Member



Here it is:
[msdn.microsoft.com...]

tedster

4:16 am on Dec 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just to make sure this is clearly communicated, this is the code, which goes in the <head> section:

<LINK REL="SHORTCUT ICON" HREF="http://www.mydomain.com/myicon.ico">

That <link> element points the browser to the favicon you want to associate with that html document.

But this does not mean that a gif, jpg or png will work as a favicon. Those are different file formats from .ico - which is the format that your desktop icons are written in.

If you have a gif or a jpg that you want to adapt to be your favicon, you need to save it in this .ico format, and not just change the extension of a regular image file.

The issue is that .ico is (at least potentially) a kind of "library" of icon files - you've seen the option in Windows for using small or large icons? Both versions of the icon reside within the same .ico file.

Because gif and jpg are not file libraries, image data in those formats does need to be changed over. The favicon is being displayed in areas of the browser "chrome" that are tied to the operating system - hence the need for an ico file.

In fact, in Explorer you can drag a bookmark to your desktop, and if there is a favicon associated with that bookmark, it will display at 32x32 if your desktop is set to show large icons. Since most favicons do not have a 32x32 version, they just get scaeld up and look jaggy. But it is possible to place the 32x32 version within the .ico file (with the right software, such as IconForge) and then the jaggies are avoided.

You can see the same thing if you keep a local version of your favicon in a folder. If you set the folder to show large icons, you'll see the favicon scaled up.

But people do not usually drag bookmarks to their desktop, as far as I know. So it's not a big deal, just a fine point. It does, however, illustrate the "library" nature of the .ico format.

whoisgregg

6:29 am on Dec 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<LINK REL="SHORTCUT ICON" HREF="http://www.mydomain.com/myicon.ico">

At least Safari (and I think Firefox is the other browser) will ask for the favicon.ico at the site root even if this tag is not included. I learned this because I my logs are always full of 404's for the favicon. It's the main reason I add a favicon -- to clean up my logs. ;)

Storyman

6:37 am on Dec 20, 2004 (gmt 0)

10+ Year Member



Something about favicon.ico that I escapes me is that when it is first uploaded and check with FireFox the icon will appear in FF and also in IE. If IE is opened first it doesn't appear until the IE logo in the url address bar is dragged off to the side and dropped.

The link load seems to work better. Thanks for the tip.

Storyman

6:40 am on Dec 20, 2004 (gmt 0)

10+ Year Member



Forgot to ask why the favicon.ico looks better in IE than in FF.

When the logo appears in FF it appears ragged, but looks sharp and clean in IE (as much as a 16X16 image file can.

gmiller

8:02 pm on Jan 8, 2005 (gmt 0)

10+ Year Member



Favicon spamming is off by default in Mozilla-based browsers (due to complaints from webmasters) but the option is there via a hidden pref. If you want to ensure that users see your site icons, be sure to include the link element.

Mozilla also supports a slightly different link syntax for this, because Microsoft screwed up. "shortcut icon" actually indicates that the link is for a "shortcut" and an "icon", but IE treats this specially. Mozilla-based browsers ignore one of the words (shortcut, I think), so you might be able to get separate icons for IE and Mozilla by using on link with "icon" and one with "shortcut icon". I haven't tried it, but if anyone wants to experiment...

Also, Mozilla based browsers should handle any image format you care to use, although IE is limited to .ico files.

Konqueror and Safari favicon spam sites that don't have icons with each new visitor now matter how their prefs are set and whether or not they bookmark the site. IE does it only when bookmarking, but I don't know about any browsers other than those I've mentioned. Any Opera fans remember how it behaves?

tedster

9:47 pm on Jan 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Opera shows the favicon in bookmarks, by the url in the location bar and on the tab for the window. If there is no favicon, a generic icon is shown - a page with a folded corner.

Opera finds favicons at the root of the site with no special code in the head of the page.

If you want to point to an icon in a different location, Opera will obey either syntax, with or without the word "shortcut".

<added>
By the way, my FireFox 1.0 shows the favicons and I never activated a hiddne preference.

Storyman

10:26 pm on Jan 8, 2005 (gmt 0)

10+ Year Member



For what it's worth. I've used 'CoolIcon Editor' for some time and have been quite please with the performance. It is a pay app, but reasonable priced and I believe there is a demo version.