Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > I can't seem to display a shortcut icon...

Reply
Thread Tools

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

 
 
G. Doucet
Guest
Posts: n/a
 
      01-01-2004
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_p...e_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


 
Reply With Quote
 
 
 
 
Steve Pugh
Guest
Posts: n/a
 
      01-01-2004
"G. Doucet" <(E-Mail Removed)> wrote:

>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_p...e_location_bar
>
>One site has the type="image/x-icon" while the other doesn't?


As an attribute of the <link> element, right? It's correct and does no
harm, but whether it does any good is doubtful.

>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
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>
 
Reply With Quote
 
 
 
 
G. Doucet
Guest
Posts: n/a
 
      01-01-2004
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


 
Reply With Quote
 
JustAnotherGuy
Guest
Posts: n/a
 
      01-01-2004
G. Doucet wrote:
> 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.

 
Reply With Quote
 
PeterMcC
Guest
Posts: n/a
 
      01-01-2004
G. Doucet wrote:
> 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.

--
PeterMcC
If you feel that any of the above is incorrect,
inappropriate or offensive in any way,
please ignore it and accept my apologies.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dropdown list in gridview does not seem to display correct data Paul ASP .Net 2 07-03-2008 03:53 PM
Shortcut to SP2's "Choose a wireless network" dialog box? =?Utf-8?B?TWljaGFlbCBBLiBMb3dyeQ==?= Wireless Networking 4 02-14-2008 05:48 PM
Disable service shortcut =?Utf-8?B?ZG9vZ2Vl?= Wireless Networking 0 10-04-2005 05:39 AM
shortcut keys don't seem to stay MB_ Computer Support 0 08-03-2005 03:32 PM
Shortcut, And Re-Directing Of Shortcut Quest. ? Robert11 Computer Support 1 12-30-2004 03:13 PM



Advertisments