Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 3 123 LastLast
Results 1 to 15 of 34
  1. #1
    New Coder
    Join Date
    Dec 2003
    Location
    Brisbane, Queensland Australia
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Icons in address bars

    I dont know if this is html or not, but how can you put your own icons in the address bar, like what google has?
    Ross

  • #2
    Regular Coder
    Join Date
    May 2004
    Location
    Minneapolis, MN, USA
    Posts
    904
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <link rel="shortcut icon" href="favicon.ico">

    To create the *.ico file you will need a graphics editor of some kind. There are some nice ones that you can get free trials of to play with. The file itself needs to be 16x16 and I think you have a maximum color depth to consider too. Likely 256 colors, but I am not sure. Perhaps 16-bit.

    http://www.awicons.com/

    That one is rather nice from what I've seen of it.

  • #3
    New Coder
    Join Date
    Sep 2004
    Location
    Guadalajara, Mexico
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it also works if you just place the "favicon.ico" on your server, it is not really needed to place the link that ]|V|[agnus mentioned above. (but if I'm wrong let e know)

  • #4
    Regular Coder
    Join Date
    Jul 2004
    Location
    engoku no anime
    Posts
    354
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What, lalo? Do you mean the <link> tag? That is the only way to call a "shortcut icon".

  • #5
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,043
    Thanks
    0
    Thanked 251 Times in 247 Posts
    IE automatically searches for icon named favicon.ico in the root and places it next to Favorites link and URL in the address bar everytime a page is bookmarked. No need for the <link> tag unless you want a different filename.

    http://msdn.microsoft.com/workshop/A...ortcutIcon.asp

  • #6
    New Coder
    Join Date
    Sep 2004
    Location
    Guadalajara, Mexico
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts
    well, at least that I know of IE, Netscape and Firefox automatically find it withouth the link, not sure about other browsers though .

  • #7
    Senior Coder
    Join Date
    Jul 2004
    Location
    New Zealand
    Posts
    1,315
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by lalo
    well, at least that I know of IE, Netscape and Firefox automatically find it withouth the link
    Which is a bad thing for user-agents to do.

  • #8
    New Coder
    Join Date
    Sep 2004
    Location
    Guadalajara, Mexico
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by hemebond
    Which is a bad thing for user-agents to do.
    ok, so you are saying that we "should" have the link then?

  • #9
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Netscape and Firefox does that too? I thought they required the link for it.

    And yes, you SHOULD have the link element on the page if you want site icons to work.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #10
    Regular Coder
    Join Date
    Jul 2004
    Location
    engoku no anime
    Posts
    354
    Thanks
    0
    Thanked 0 Times in 0 Posts
    User-agents should not search for the icon. That is going against "Teh Kode O Teh Webb Devellopperz". Actually, user-agents are reaching out to a server. If a hacker found out how to keep that gateway open long enough, he/she could put malware, viruses, or even trojans on your computer. Eventually, the Web would become chaotic and would need to be completely recreated.

    That's my theory anyway.

  • #11
    Regular Coder
    Join Date
    May 2004
    Location
    Minneapolis, MN, USA
    Posts
    904
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sounds more like a reflection of current reality...

    But yes, it is bad juju for UAs to be automatically looking for anything, for the most part. Their function is to do what they're told, not do as they please.

  • #12
    New Coder
    Join Date
    Sep 2004
    Location
    Guadalajara, Mexico
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts
    so you guys are saying that if we place the link to the favicon, the User-agents should not even "bother" to look on our server for nothing else ?

  • #13
    Regular Coder
    Join Date
    May 2004
    Location
    San Jose, CA
    Posts
    388
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What's being said is that for a UA to *automatically* look for that, without being told to do so, is a potential window to take advantage of. What should be looked for is only what we code it to look for. It shouldn't do anything of its own accord.
    -ts

    {{suddenly I'm flashing back to TRON; those poor, poor UAs...}}
    -Challenge The Status Quo
    -www.toddseal.com/rodin

  • #14
    Senior Coder
    Join Date
    Jul 2004
    Location
    New Zealand
    Posts
    1,315
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by liorean
    Netscape and Firefox does that too? I thought they required the link for it.

    And yes, you SHOULD have the link element on the page if you want site icons to work.
    Yes, unfortunately they do. But, they also implement the link element correctly (and incorrectly to match IE). The actual code to use is
    Code:
    <link rel="icon" href="/favicon.png" type="image/png">
    Obviously the href and type can be different, but take note of the rel. rel takes a space-seperated list of values. This means that an element that has
    Code:
    rel="shortcut icon"
    actually has two values; "shortcut" and "icon". IE gets this wrong (surprise) by thinking "shortcut icon" is one value.

  • #15
    New Coder
    Join Date
    Sep 2004
    Location
    Guadalajara, Mexico
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts
    so by default the correct link should be ??? :
    Code:
    <link rel="icon" href="favicon.ico" type="image/ico">


  •  
    Page 1 of 3 123 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •