Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Whats best practice code for adding a FAVICON
Old 07-30-2009, 10:17 PM Whats best practice code for adding a FAVICON
TWD
TWD's Avatar
King Spam Talker

Posts: 1,184
Trades: 0
If you don't know what a favicon is, read this
Webmaster-Talk article.
http://www.webmaster-talk.com/articl...important.html

I've seen favicons implemented a number of different ways so
I was wondering if there is any consensus on best practice.

For example I have always omitted the
Quote:
type=”image/x-icon”
and it hasnt caused any problems.

Similarly some blog authors recommend adding

Quote:
<link rel=”shortcut icon” href=”/favicon.ico”>
Some recommend creating a 16px by 16px PLUS a 32px by 32px .ico file
since some browsers allow users to create a custtom desktop icon from the URL in 32x32px.

Also, does it make any practical difference whether to use
a relative link or an absolute link to the .ico file?
My memory is a little hazy but I think I had
problems once with using a relative link.
Might be wrong about that though.

A couple of very useful articles here about how to create
an .ico file in PhotoShop
http://www.photoshopsupport.com/tuto...r/favicon.html

and some more advanced possibilities.
http://perishablepress.com/press/200...bout-favicons/

Interestingly, if you read both articles you will find out how to add an animated GIF as your favicon.
I've seen then before and always wondered how they were implemented.

Last edited by TWD; 07-30-2009 at 11:22 PM..
TWD is online now
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-30-2009, 11:07 PM Re: Whats best practice code for adding a FAVICON
The-Pixel's Avatar
I <3 Pixel's

Posts: 888
Name: Lindi Wheaton
Location: In Photoshop
Trades: 0
Great article thanks for sharing!
__________________
The-Pixel

Please login or register to view this content. Registration is FREE
:: iPhone Apps, Pre-Made Templates, Widgets, Menus, etc.

Please login or register to view this content. Registration is FREE
:: Web Design / Development, Business Cards, Logo Designs, etc.
The-Pixel is offline
Reply With Quote
View Public Profile Visit The-Pixel's homepage!
 
Old 07-31-2009, 02:09 AM Re: Whats best practice code for adding a FAVICON
Banned

Latest Blog Post:
Oscar: The Bionic Cat
Posts: 237
Trades: 0
is there any different way..? i think there's only one way to do that.. been using favicon for my site too..
bogs is offline
Reply With Quote
View Public Profile Visit bogs's homepage!
 
Old 07-31-2009, 02:22 AM Re: Whats best practice code for adding a FAVICON
TWD
TWD's Avatar
King Spam Talker

Posts: 1,184
Trades: 0
Quote:
Originally Posted by bogs View Post
is there any different way..? i think there's only one way to do that.. been using favicon for my site too..
If you read my post again you will see that there are different ways
of getting the same result. IE has idiosyncratic behavior though
so I was asking if anybody has advice on best practice.

So what code do you use on your site for the favicon. Please share?
TWD is online now
Reply With Quote
View Public Profile
 
Old 07-31-2009, 02:35 AM Re: Whats best practice code for adding a FAVICON
Skilled Talker

Posts: 54
Trades: 0
I don't use a code as both IE7+ and FF2+ automagically search for a favicon.ico file.
KellyAX is offline
Reply With Quote
View Public Profile
 
Old 07-31-2009, 10:10 AM Re: Whats best practice code for adding a FAVICON
TWD
TWD's Avatar
King Spam Talker

Posts: 1,184
Trades: 0
Quote:
Originally Posted by KellyAX View Post
I don't use a code as both IE7+ and FF2+ automagically search for a favicon.ico file.
You've got a point there but of course it doesn't work for IE6 (I think)
or if you want to use say, an animated GIF file.

Do Safari, Chrome and Opera automatically find the .ico file in the root?
TWD is online now
Reply With Quote
View Public Profile
 
Old 07-31-2009, 11:06 AM Re: Whats best practice code for adding a FAVICON
Banned

Posts: 315
Name: Doug
Trades: 1
When I updated my files to the XHTML standard I finally added favicon's too.
Had heard of them but never bothered before that.

I use <link rel="shortcut icon" href="favicon.ico" />
It seems to work on many browsers.

The thing I ran into is that Paint Shop Pro does not come with the ability
to make an .ico file. I had to go out and find a plugin.

If I remember correctly, I used 16px files.
My Favicons won't win any awards, but I got rid of those file not found errors.
marketingman100 is offline
Reply With Quote
View Public Profile
 
Old 07-31-2009, 12:36 PM Re: Whats best practice code for adding a FAVICON
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Simplest way is to simply have the icon in the site root, all browsers will look for the favicon there. ONLY if the image is elsewhere in the site structure do you need to tell browsers where it is located.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-01-2009, 10:53 AM Re: Whats best practice code for adding a FAVICON
TWD
TWD's Avatar
King Spam Talker

Posts: 1,184
Trades: 0
Quote:
Originally Posted by chrishirst View Post
Simplest way is to simply have the icon in the site root, all browsers will look for the favicon there. ONLY if the image is elsewhere in the site structure do you need to tell browsers where it is located.
Perhaps that is the simplest.
But Im not sure its best practice for two reasons.

1) If I want to change the ico file to a non X-icon MIME type like
an animated GIF, the browser needs some instructions on where to find it.

2) I dont think that works in IE6. (Although perhaps in a year or two the retort will be "who cares")
TWD is online now
Reply With Quote
View Public Profile
 
Old 08-01-2009, 04:12 PM Re: Whats best practice code for adding a FAVICON
ewomack's Avatar
Ultra Talker

Latest Blog Post:
Reaching Out To Nature
Posts: 318
Trades: 0
The link worked for me... I have a favicon on FF at least (and what else really matters ). Thanks for posting!
__________________
Ed Womack

Please login or register to view this content. Registration is FREE
ewomack is offline
Reply With Quote
View Public Profile Visit ewomack's homepage!
 
Old 08-02-2009, 01:07 AM Re: Whats best practice code for adding a FAVICON
treyk4's Avatar
Skilled Talker

Posts: 89
Name: Trey
Trades: 0
I always just use
Code:
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
__________________
Decatur-Austin Robotics Coalition (DARC) -
Please login or register to view this content. Registration is FREE

treyk4 is offline
Reply With Quote
View Public Profile
 
Old 08-03-2009, 06:46 PM Re: Whats best practice code for adding a FAVICON
Average Talker

Posts: 27
Name: Simohammed
Trades: 0
Nice, thanks for sharing
simohammed is offline
Reply With Quote
View Public Profile
 
Old 08-06-2009, 06:51 AM Re: Whats best practice code for adding a FAVICON
Experienced Talker

Posts: 46
Trades: 0
Nice article and thanks for sharing
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Bestone is offline
Reply With Quote
View Public Profile Visit Bestone's homepage!
 
Old 08-06-2009, 07:27 AM Re: Whats best practice code for adding a FAVICON
pdjprateek's Avatar
Experienced Talker

Posts: 38
Name: Prateek Jain
Location: India
Trades: 0
Quote:
The official IANA registered MIME type for ico files is image/vnd.microsoft.icon. Before this was registered, image/x-icon was the accepted option that complied with the rules of using x- for unregistered tokens. Many other erroneous MIME types are still seen, including image/ico, image/icon, text/ico, and application/ico. Many web servers do not come configured with a MIME type setting for .ico files, and may send their default MIME type, which might be text/html or text/plain.
This is what wikipedia has to say,


and just to let you know i have been using that code for the past 6 months or so and it works like a charm on all browsers be it FF , IE6 IE7 and other browsers.

I guess that is what the best code for the Favicon is .

That code should be put up as a sticky as there is always a compatibility problem with the "x-icon" type of thing, [ dont know , read it somewhere ]

Prateek.
PDJSolutions.
__________________
I am a logo designer, doing logos at $20 . Mail me:
Please login or register to view this content. Registration is FREE
. for more details or if you want something to be done.
pdjprateek is offline
Reply With Quote
View Public Profile Visit pdjprateek's homepage!
 
Old 08-11-2009, 08:20 PM Re: Whats best practice code for adding a FAVICON
Junior Talker

Posts: 2
Trades: 0
im just placing it at the root folder as well and works fine for most users...
__________________

Please login or register to view this content. Registration is FREE
shivas is offline
Reply With Quote
View Public Profile
 
Old 08-11-2009, 08:45 PM Re: Whats best practice code for adding a FAVICON
Super Talker

Latest Blog Post:
SEO Promotion Online
Posts: 101
Name: Jeff
Trades: 0
There's a lot of free tools in the internet you just need to search.
__________________
Easy to Approve
Please login or register to view this content. Registration is FREE

Submit your website at
Please login or register to view this content. Registration is FREE
JeffNetSite is offline
Reply With Quote
View Public Profile Visit JeffNetSite's homepage!
 
Old 08-12-2009, 06:34 AM Re: Whats best practice code for adding a FAVICON
Experienced Talker

Posts: 38
Trades: 0
I have always used:
<link rel="shortcut icon" href="favicon.ico">

it works perfectly for me
__________________
I am thewebtaylor!! Website design, SEO and marketing.


Please login or register to view this content. Registration is FREE
thewebtaylor is offline
Reply With Quote
View Public Profile
 
Old 08-15-2009, 12:12 AM Re: Whats best practice code for adding a FAVICON
Junior Talker

Posts: 4
Name: Thierry Clermont
Location: Montréal
Trades: 0
I use this code and it's working well on my website.
<link rel="shortcut icon" href="http://mywebsitearethebest.com/images/favicon.gif" />
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
,
Please login or register to view this content. Registration is FREE
, etc.
thierryB is offline
Reply With Quote
View Public Profile Visit thierryB's homepage!
 
Old 08-15-2009, 05:10 PM Re: Whats best practice code for adding a FAVICON
Average Talker

Posts: 22
Name: subash chandra poudel
Location: pokhra , nepal
Trades: 0
I use this one ::

<link rel="shortcut icon" href="http://onlinecguru.com/favicon.ico">
<link rel="icon" href="http://onlinecguru.com/favicon.ico">
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
onlinecguru.com is offline
Reply With Quote
View Public Profile Visit onlinecguru.com's homepage!
 
Old 08-17-2009, 07:52 PM Re: Whats best practice code for adding a FAVICON
TWD
TWD's Avatar
King Spam Talker

Posts: 1,184
Trades: 0
Quote:
Originally Posted by thierryB View Post
I use this code and it's working well on my website.
<link rel="shortcut icon" href="http://mywebsitearethebest.com/images/favicon.gif" />
I'd like to see your site but the link appears broken.
I am curious because you have defined a GIF image without
defining the MIME type so in theory it shouldn't work!

If you read the thread, my understanding is that in order to use
anything other the an .ico file, you must define the correct MIME.
TWD is online now
Reply With Quote
View Public Profile
 
Reply     « Reply to Whats best practice code for adding a FAVICON
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.13948 seconds with 12 queries