tags:

views:

136

answers:

4
<link rel="shortcut icon" href="/favicon.ico">
<link rel="Bookmark" href="/favicon.ico">

I saw it somewhere,but is <link rel="Bookmark".. necessary?

+1  A: 

A nice article on this

Putting rel="bookmark" to work

rahul
A: 

This is a crossbrowser way to make sure the browser knows where your favicon is located for both viewing the page and bookmarking the page. Chances are, if you don't know what that code is, you don't have a favicon. The easiest way to make on is to make a 16x16px gif and change its extension to '.ico' - then you'll get your little icon in the corner of the browser bar (depending on your browser).

Alex Sexton
+8  A: 

That bookmark link is incorrect. It should be:

<link rel="bookmark" href="http://my.site.com/some/path/permalink.html"&gt;

ie a perma-link and not the icon. See 6.12 Link types from the HTML 4.01 specification:

Bookmark
Refers to a bookmark. A bookmark is a link to a key entry point within an extended document. The title attribute may be used, for example, to label the bookmark. Note that several bookmarks may be defined in each document.

cletus
Why is it a link instead of favicon?
Is it necessary at all?
+2  A: 

This is the cross-browser way of adding favicons:

<link rel="icon" href="/favicon.ico" />
<link rel="Shortcut Icon" href="/favicon.ico" type="image/x-icon" />  

the icon file itself would preferably be 16x16 pixels and in gif format (IE6 wont use transparent png) and under 500 bytes. Though most modern browsers now accept practically anything, though of course it will be your bandwidth and their waiting.

i googled for a page stating this. link

as cletus mentions, the Bookmark link is not for favicon and the code you provided is actually wrong.

EDIT: the favicon link does not influence your bookmarking itself, yet it helps the browser store a little icon on the tabs or your browser's bookmarks' menu. StackOverflow uses this icon.

But Is It necessary? If your icon is located at /favicon.ico, no it is not absolutely critical at all. Most browsers check that path by default, but if you like me put your favicon in a directory like /images/favicon.ico you would need to tell the browser to get it from there or your server will build up alot of 404-Not Found errors in its log. Which will slow things down (a bit). Also you might want to have different icons for different directories etc.

Mohammad
But he didn't answer my question:is it necessary at all?I can bookmark sites without the code with no problem.
I edited my answer above to reflect your question : )
Mohammad
No,I'm talking about `<link rel="Bookmark"..`.I know the issue short icon months ago.
cletus defined what a rel="bookmark" is, and no its not necessary for a link to work http://www.w3.org/TR/html401/struct/links.html#adef-rel and it doesn't have to be "bookmark" either it could be "prev", "next", or any other text you think might be useful for your DOM manipulation, for example with javascript.
Mohammad