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

Discussion in 'HTML' started by G. Doucet, Jan 1, 2004.

  1. G. Doucet

    G. Doucet Guest

    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
     
    G. Doucet, Jan 1, 2004
    #1
    1. Advertising

  2. G. Doucet

    Steve Pugh Guest

    "G. Doucet" <> 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_picture_in_the_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 <> <http://steve.pugh.net/>
     
    Steve Pugh, Jan 1, 2004
    #2
    1. Advertising

  3. G. Doucet

    G. Doucet Guest

    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
     
    G. Doucet, Jan 1, 2004
    #3
  4. 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.
     
    JustAnotherGuy, Jan 1, 2004
    #4
  5. G. Doucet

    PeterMcC Guest

    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.
     
    PeterMcC, Jan 1, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Miro Durcik

    app.rc resource's icon to .net Icon

    Miro Durcik, Oct 9, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    1,437
    Miro Durcik
    Oct 9, 2004
  2. Charles Bazi

    Shortcut Icon

    Charles Bazi, Apr 13, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    543
    Charles Bazi
    Apr 13, 2006
  3. Greg Fyans
    Replies:
    2
    Views:
    854
  4. JB
    Replies:
    1
    Views:
    6,262
    Jason Keats
    Sep 29, 2010
  5. Replies:
    3
    Views:
    151
Loading...

Share This Page