I can't seem to display a shortcut icon...

G

G. Doucet

I am running win98 with IE6.0
I have seen a few sites that have a shortcut icon.
Their icon displays both in the address bar and in the favorite list.
Examples:
Google: http://www.google.ca/
WDG: http://www.htmlhelp.com/reference/html40/

I am trying to add a shortcut icon on my own site.
I have read the following articles:
http://www.cursorarts.com/ca_faqif.html#02
http://allmyfaqs.com/faq.pl?Little_picture_in_the_location_bar

One site has the type="image/x-icon" while the other doesn't?

Funny thing is the source of Google or WDK don't even appear to specify an
icon.

I have tried and tried but I still can't get my icon to show.
This is the begining of my HTML file as it is now:

<HTML>
<HEAD>
<LINK rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<LINK rel="icon" href="favicon.ico" type="image/x-icon">
</HEAD>
<BODY bgcolor=76A9C7 alink=0000FF link=0000FF vlink=0000FF topmargin=0
leftmargin=5 rightmargin=5 bottommargin=0>
<CENTER>

By the way, I am starting to notice that HTML documents now begin with
something like:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
Do I need one of those lines? Could that be what I'm missing?

I can't imagine it's a setting in IE since I can see the shortcut icon in
Google etc...

Last thing, Is it possible that I've seen a shortcut icon in the title bar?

Thanks for all,
Guy
 
S

Steve Pugh

G. Doucet said:
I am running win98 with IE6.0
I have seen a few sites that have a shortcut icon.

If you are using IE then you will only have seen icons after you have
added the site in question to your favorites.Some other browsers will
display it straight away.
Their icon displays both in the address bar and in the favorite list.
Examples:
Google: http://www.google.ca/
WDG: http://www.htmlhelp.com/reference/html40/

I am trying to add a shortcut icon on my own site.
I have read the following articles:
http://www.cursorarts.com/ca_faqif.html#02
http://allmyfaqs.com/faq.pl?Little_picture_in_the_location_bar

One site has the type="image/x-icon" while the other doesn't?

Funny thing is the source of Google or WDK don't even appear to specify an
icon.

They don't need to, nor do you. When you add a site to your favorites
list in IE it automatically asks the server for favicon.ico. Using the
<link> code in your HTML means that (a) you can call your icon
something other favicon.ico, (b) you can place it anywhere you like,
not just in the site root and (c) other browsers can also display the
icon (though Opera has an option to _always_ ask for an icon, which
results in even more 404s than IE's behaviour).
I have tried and tried but I still can't get my icon to show.
This is the begining of my HTML file as it is now:

<HTML>
<HEAD>
<LINK rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<LINK rel="icon" href="favicon.ico" type="image/x-icon">
</HEAD>

Having both versions shouldn't cause any harm, but it might.

BTW, technically
<LINK rel="shortcut icon" href="favicon.ico" type="image/x-icon">
is the same as
<LINK rel="icon shortcut" href="favicon.ico" type="image/x-icon">
and the same as
<LINK rel="icon" href="favicon.ico" type="image/x-icon">
<LINK rel="shortcut icon" href="favicon.ico" type="image/x-icon">

But IE doesn't treat all versions equally. Best to stick to just
rel="shortcut con"
<BODY bgcolor=76A9C7 alink=0000FF link=0000FF vlink=0000FF topmargin=0
leftmargin=5 rightmargin=5 bottommargin=0>
<CENTER>

Ouch. What's all that mid-1990s crud doing there? It's 2004, time to
learn about the benefits of CSS.
By the way, I am starting to notice that HTML documents now begin with
something like:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
Do I need one of those lines? Could that be what I'm missing?

Not if you're writing HTML like the above snippet, when you start
writing valid HTML you will want to include a doctype to state which
version of HTML you are writing. Some browsers do behave differently
depending on which doctype is specified but that has no bearing on the
display of icons.
Last thing, Is it possible that I've seen a shortcut icon in the title bar?

Not as far as I know.

Steve
 
G

G. Doucet

Ok here's the situation... with my win98 2e and IE6.0

You were right... when I add Google to my favorites, it adds the favicon in
the favorite list.

Thereafter, if I click on Google from the favorite list, it will also
display the favicon in the address bar.

If however, I clear the IE history from Tools - Internet Options, the
favicons all disappear from the list and the address bar, even if I close
and relaunch IE, so now Google no longer displays its favicon, unless I
remove it from the list and add it again!!!

In my situation, I already had my site in my favorites from the time when I
hadn't specified a favicon, so adding a favicon to my site did nothing for
me.

What I finally had to do was remove my site from my favorite list, clear the
history, then add my site to the favorites again.


So now it works, but to add to this, I wanted to change my favicon. What I
did was rename another icon to favicon.ico and uploaded it. I went through
the process of removing the link, clearing the history and re-adding the
link. Somehow it still reflected the old icon. I did this a few times
because at first I thought I must not have uploaded the right icon or
something. But sure enough, no matter what, even after clearing history and
everything, it still reflected the original icon when I added the link to
the list. In my lack of experience, I renamed the icon to something else,
and also updated the index.htm file to reflect the new name, and now I have
the icon I want.


What a lot of trouble to display an icon!

Guy Doucet
 
J

JustAnotherGuy

G. Doucet said:
What a lot of trouble to display an icon!

I think the basic problem is that internet explorer doesn't reliably
display favicons. despite being the first to implement the concept. duh.
 
P

PeterMcC

G. Doucet said:
Ok here's the situation... with my win98 2e and IE6.0

You were right... when I add Google to my favorites, it adds the
favicon in the favorite list.

Thereafter, if I click on Google from the favorite list, it will also
display the favicon in the address bar.

If however, I clear the IE history from Tools - Internet Options, the
favicons all disappear from the list and the address bar, even if I
close and relaunch IE, so now Google no longer displays its favicon,
unless I remove it from the list and add it again!!!

In my situation, I already had my site in my favorites from the time
when I hadn't specified a favicon, so adding a favicon to my site did
nothing for me.

What I finally had to do was remove my site from my favorite list,
clear the history, then add my site to the favorites again.


So now it works, but to add to this, I wanted to change my favicon.
What I did was rename another icon to favicon.ico and uploaded it. I
went through the process of removing the link, clearing the history
and re-adding the link. Somehow it still reflected the old icon. I
did this a few times because at first I thought I must not have
uploaded the right icon or something. But sure enough, no matter
what, even after clearing history and everything, it still reflected
the original icon when I added the link to the list. In my lack of
experience, I renamed the icon to something else, and also updated
the index.htm file to reflect the new name, and now I have the icon I
want.


What a lot of trouble to display an icon!

Did you clear the cache when you cleared everything? If not, the browser may
have been picking up the old favicon.ico from there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top