What is the best practice for creating a favicon on a web site?How to add an icon in the address bar in Flask?What kind of way is better to add website icon in browser?Separate icon for browser tab and 'Add To Desktop'Google Chrome Uses Wrong Size of FaviconHow to have multiple favicon sizes, yet serve only a 16x16 by default?Adding a favicon to a static HTML pageWhat is state-of-art of favicons in 2013?Favicons - Best practicesUsing a 48x48 faviconHTML 5 Favicon - Support?Cannot display HTML stringIs there a correct location to place favicon / icon files in my web root?react app favicon / manifest not being displayed on gh-pages
Why do I get two different answers for this counting problem?
What would happen to a modern skyscraper if it rains micro blackholes?
Why does Kotter return in Welcome Back Kotter?
What does CI-V stand for?
Prove that NP is closed under karp reduction?
Today is the Center
Have astronauts in space suits ever taken selfies? If so, how?
How to write a macro that is braces sensitive?
Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?
The magic money tree problem
Why don't electron-positron collisions release infinite energy?
Theorems that impeded progress
How to test if a transaction is standard without spending real money?
How do I create uniquely male characters?
Why dont electromagnetic waves interact with each other?
How old can references or sources in a thesis be?
"You are your self first supporter", a more proper way to say it
Email Account under attack (really) - anything I can do?
How is it possible to have an ability score that is less than 3?
Can I make popcorn with any corn?
How can I prevent hyper evolved versions of regular creatures from wiping out their cousins?
the place where lots of roads meet
Test if tikzmark exists on same page
What does it mean to describe someone as a butt steak?
What is the best practice for creating a favicon on a web site?
How to add an icon in the address bar in Flask?What kind of way is better to add website icon in browser?Separate icon for browser tab and 'Add To Desktop'Google Chrome Uses Wrong Size of FaviconHow to have multiple favicon sizes, yet serve only a 16x16 by default?Adding a favicon to a static HTML pageWhat is state-of-art of favicons in 2013?Favicons - Best practicesUsing a 48x48 faviconHTML 5 Favicon - Support?Cannot display HTML stringIs there a correct location to place favicon / icon files in my web root?react app favicon / manifest not being displayed on gh-pages
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
Question
- What is the best practice for creating a favicon on a web site?
- and is an .ico file with both 16x16 and 32x32 images better than a .png file with 16x16 only?
- Could the right method preferred today not be working in reasonably old browsers?
Method 1
Placing a file named favicon.ico
in the main directory is one way. The browser always requests that file. You can see that in the apache log files.
Method 2
HTML tag in the <head>
section:
<link rel="shortcut icon" href="/images/favicon.png (or ico?)" type="image/x-icon" />
html html5 favicon
add a comment |
Question
- What is the best practice for creating a favicon on a web site?
- and is an .ico file with both 16x16 and 32x32 images better than a .png file with 16x16 only?
- Could the right method preferred today not be working in reasonably old browsers?
Method 1
Placing a file named favicon.ico
in the main directory is one way. The browser always requests that file. You can see that in the apache log files.
Method 2
HTML tag in the <head>
section:
<link rel="shortcut icon" href="/images/favicon.png (or ico?)" type="image/x-icon" />
html html5 favicon
add a comment |
Question
- What is the best practice for creating a favicon on a web site?
- and is an .ico file with both 16x16 and 32x32 images better than a .png file with 16x16 only?
- Could the right method preferred today not be working in reasonably old browsers?
Method 1
Placing a file named favicon.ico
in the main directory is one way. The browser always requests that file. You can see that in the apache log files.
Method 2
HTML tag in the <head>
section:
<link rel="shortcut icon" href="/images/favicon.png (or ico?)" type="image/x-icon" />
html html5 favicon
Question
- What is the best practice for creating a favicon on a web site?
- and is an .ico file with both 16x16 and 32x32 images better than a .png file with 16x16 only?
- Could the right method preferred today not be working in reasonably old browsers?
Method 1
Placing a file named favicon.ico
in the main directory is one way. The browser always requests that file. You can see that in the apache log files.
Method 2
HTML tag in the <head>
section:
<link rel="shortcut icon" href="/images/favicon.png (or ico?)" type="image/x-icon" />
html html5 favicon
html html5 favicon
edited Mar 8 at 4:31
laggingreflex
14.9k1996150
14.9k1996150
asked Sep 20 '14 at 20:15
bytecode77bytecode77
7,8152279110
7,8152279110
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
There are several ways to create a favicon. The best way for you depends on various factors:
- The time you can spend on this task. For many people, this is "as quick as possible".
- The efforts you are willing to make. Like, drawing a 16x16 icon by hand for better results.
- Specific constraints, like supporting a specific browser with odd specs.
First method: Use a favicon generator
If you want to get the job done well and quickly, you can use a favicon generator. This one creates the pictures and HTML code for all major desktop and mobiles browsers. Full disclosure: I'm the author of this site.
Advantages of such solution: it's quick and all compatibility considerations were already addressed for you.
Second method: Create a favicon.ico (desktop browsers only)
As you suggest, you can create a favicon.ico
file which contains 16x16 and 32x32 pictures (note that Microsoft recommends 16x16, 32x32 and 48x48).
Then, declare it in your HTML code:
<link rel="shortcut icon" href="/path/to/icons/favicon.ico">
This method will work with all desktop browsers, old and new. But most mobile browsers will ignore the favicon.
About your suggestion of placing the favicon.ico
file in the root and not declaring it: beware, although this technique works on most browsers, it is not 100% reliable. For example Windows Safari cannot find it (granted: this browser is somehow deprecated on Windows, but you get the point). This technique is useful when combined with PNG icons (for modern browsers).
Third method: Create a favicon.ico, a PNG icon and an Apple Touch icon (all browsers)
In your question, you do not mention the mobile browsers. Most of them will ignore the favicon.ico
file. Although your site may be dedicated to desktop browsers, chances are that you don't want to ignore mobile browsers altogether.
You can achieve a good compatibility with:
favicon.ico
, see above.- A 192x192 PNG icon for Android Chrome
- A 180x180 Apple Touch icon (for iPhone 6 Plus; other device will scale it down as needed).
Declare them with
<link rel="shortcut icon" href="/path/to/icons/favicon.ico">
<link rel="icon" type="image/png" href="/path/to/icons/favicon-192x192.png" sizes="192x192">
<link rel="apple-touch-icon" sizes="180x180" href="/path/to/icons/apple-touch-icon-180x180.png">
This is not the full story, but it's good enough in most cases.
5
Actually, the still often used <link rel="shortcut icon" href="/path/to/icons/favicon.ico"> is not a valid option. It is not even standard and only IE supports it. And as of IE 9, IE support the default 'look at root' method. So it is not a way to support all browsers, but just a way to support IE < 9. Rely on the (now standard) 'place in root' method or, if you insist, add: <link rel="icon" href="/favicon.ico"> (Even though this isnt standard either)
– HappyMe
Sep 8 '16 at 14:58
2
The favicon mechanism has definitely evolved over the years. I noticed today the spec at MDN now says: The shortcut link type is often seen before icon, but this link type is non-conforming, ignored and web authors must not use it anymore. Meaning use<link ref="icon" ...>
rather than<link ref="shortcut icon" ...>
developer.mozilla.org/en-US/docs/Web/HTML/Link_types
– broc.seib
Jun 5 '18 at 14:42
1
Thank you @broc.seib for the feedback. At time of writing this comment, I lost track of why it was "shortcut icon" and not "icon". Sure, Mozilla has its voice in this story. But we must not forget why this declaration is here in the first place: to support legacy browsers, such as IE 8. Most recent browsers use PNG icons, which are cleaner and lighter than ICO. My plan for RealFavicon is to remove this declaration completely. Before this, I need to run tests on IE 7, 8 and 9.
– philippe_b
Jun 5 '18 at 17:00
Not to mention, that if you "view source" on this page, on Stack Overflow,ref="shortcut icon"
is exactly what they use.
– Steven Ventimiglia
Jan 3 at 19:57
Am I missing something (history) or this doesn't answer the actual question - what's the difference between/favicon.ico
vs<link rel="shortcut icon" />
?
– laggingreflex
Mar 8 at 4:29
|
show 1 more comment
- you can work with this website for generate favin.ico
- I recommend use .ico format because the png don't work with method 1 and ico could have more detail!
- both method work with all browser but when it's automatically work what you want type a code for it? so i think method 1 is better.
add a comment |
I used https://iconifier.net
I uploaded my image, downloaded images zip file, added images to my server, followed the directions on the site including adding the links to my index.html and it worked. My favicon now shows on my iPhone in Safari when 'Add to home screen'
add a comment |
I think so everything that is most important has already been said.
Let me only add that this declaration allows you to put a movable GIF in the place of favicon:
<link rel="shortcut icon" href="img/icon.gif" />
This is happens on some pages. The effect of the moving favicon makes the card of this website stand out from the other cards.
Unfortunately, this behavior and this property are not guaranteed by any of the browsers. Even Firefox, on which I observed it one day, on the second day displayed a standard empty icon in place of a GIF for the same page.
add a comment |
protected by cassiomolin Nov 1 '18 at 14:44
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
There are several ways to create a favicon. The best way for you depends on various factors:
- The time you can spend on this task. For many people, this is "as quick as possible".
- The efforts you are willing to make. Like, drawing a 16x16 icon by hand for better results.
- Specific constraints, like supporting a specific browser with odd specs.
First method: Use a favicon generator
If you want to get the job done well and quickly, you can use a favicon generator. This one creates the pictures and HTML code for all major desktop and mobiles browsers. Full disclosure: I'm the author of this site.
Advantages of such solution: it's quick and all compatibility considerations were already addressed for you.
Second method: Create a favicon.ico (desktop browsers only)
As you suggest, you can create a favicon.ico
file which contains 16x16 and 32x32 pictures (note that Microsoft recommends 16x16, 32x32 and 48x48).
Then, declare it in your HTML code:
<link rel="shortcut icon" href="/path/to/icons/favicon.ico">
This method will work with all desktop browsers, old and new. But most mobile browsers will ignore the favicon.
About your suggestion of placing the favicon.ico
file in the root and not declaring it: beware, although this technique works on most browsers, it is not 100% reliable. For example Windows Safari cannot find it (granted: this browser is somehow deprecated on Windows, but you get the point). This technique is useful when combined with PNG icons (for modern browsers).
Third method: Create a favicon.ico, a PNG icon and an Apple Touch icon (all browsers)
In your question, you do not mention the mobile browsers. Most of them will ignore the favicon.ico
file. Although your site may be dedicated to desktop browsers, chances are that you don't want to ignore mobile browsers altogether.
You can achieve a good compatibility with:
favicon.ico
, see above.- A 192x192 PNG icon for Android Chrome
- A 180x180 Apple Touch icon (for iPhone 6 Plus; other device will scale it down as needed).
Declare them with
<link rel="shortcut icon" href="/path/to/icons/favicon.ico">
<link rel="icon" type="image/png" href="/path/to/icons/favicon-192x192.png" sizes="192x192">
<link rel="apple-touch-icon" sizes="180x180" href="/path/to/icons/apple-touch-icon-180x180.png">
This is not the full story, but it's good enough in most cases.
5
Actually, the still often used <link rel="shortcut icon" href="/path/to/icons/favicon.ico"> is not a valid option. It is not even standard and only IE supports it. And as of IE 9, IE support the default 'look at root' method. So it is not a way to support all browsers, but just a way to support IE < 9. Rely on the (now standard) 'place in root' method or, if you insist, add: <link rel="icon" href="/favicon.ico"> (Even though this isnt standard either)
– HappyMe
Sep 8 '16 at 14:58
2
The favicon mechanism has definitely evolved over the years. I noticed today the spec at MDN now says: The shortcut link type is often seen before icon, but this link type is non-conforming, ignored and web authors must not use it anymore. Meaning use<link ref="icon" ...>
rather than<link ref="shortcut icon" ...>
developer.mozilla.org/en-US/docs/Web/HTML/Link_types
– broc.seib
Jun 5 '18 at 14:42
1
Thank you @broc.seib for the feedback. At time of writing this comment, I lost track of why it was "shortcut icon" and not "icon". Sure, Mozilla has its voice in this story. But we must not forget why this declaration is here in the first place: to support legacy browsers, such as IE 8. Most recent browsers use PNG icons, which are cleaner and lighter than ICO. My plan for RealFavicon is to remove this declaration completely. Before this, I need to run tests on IE 7, 8 and 9.
– philippe_b
Jun 5 '18 at 17:00
Not to mention, that if you "view source" on this page, on Stack Overflow,ref="shortcut icon"
is exactly what they use.
– Steven Ventimiglia
Jan 3 at 19:57
Am I missing something (history) or this doesn't answer the actual question - what's the difference between/favicon.ico
vs<link rel="shortcut icon" />
?
– laggingreflex
Mar 8 at 4:29
|
show 1 more comment
There are several ways to create a favicon. The best way for you depends on various factors:
- The time you can spend on this task. For many people, this is "as quick as possible".
- The efforts you are willing to make. Like, drawing a 16x16 icon by hand for better results.
- Specific constraints, like supporting a specific browser with odd specs.
First method: Use a favicon generator
If you want to get the job done well and quickly, you can use a favicon generator. This one creates the pictures and HTML code for all major desktop and mobiles browsers. Full disclosure: I'm the author of this site.
Advantages of such solution: it's quick and all compatibility considerations were already addressed for you.
Second method: Create a favicon.ico (desktop browsers only)
As you suggest, you can create a favicon.ico
file which contains 16x16 and 32x32 pictures (note that Microsoft recommends 16x16, 32x32 and 48x48).
Then, declare it in your HTML code:
<link rel="shortcut icon" href="/path/to/icons/favicon.ico">
This method will work with all desktop browsers, old and new. But most mobile browsers will ignore the favicon.
About your suggestion of placing the favicon.ico
file in the root and not declaring it: beware, although this technique works on most browsers, it is not 100% reliable. For example Windows Safari cannot find it (granted: this browser is somehow deprecated on Windows, but you get the point). This technique is useful when combined with PNG icons (for modern browsers).
Third method: Create a favicon.ico, a PNG icon and an Apple Touch icon (all browsers)
In your question, you do not mention the mobile browsers. Most of them will ignore the favicon.ico
file. Although your site may be dedicated to desktop browsers, chances are that you don't want to ignore mobile browsers altogether.
You can achieve a good compatibility with:
favicon.ico
, see above.- A 192x192 PNG icon for Android Chrome
- A 180x180 Apple Touch icon (for iPhone 6 Plus; other device will scale it down as needed).
Declare them with
<link rel="shortcut icon" href="/path/to/icons/favicon.ico">
<link rel="icon" type="image/png" href="/path/to/icons/favicon-192x192.png" sizes="192x192">
<link rel="apple-touch-icon" sizes="180x180" href="/path/to/icons/apple-touch-icon-180x180.png">
This is not the full story, but it's good enough in most cases.
5
Actually, the still often used <link rel="shortcut icon" href="/path/to/icons/favicon.ico"> is not a valid option. It is not even standard and only IE supports it. And as of IE 9, IE support the default 'look at root' method. So it is not a way to support all browsers, but just a way to support IE < 9. Rely on the (now standard) 'place in root' method or, if you insist, add: <link rel="icon" href="/favicon.ico"> (Even though this isnt standard either)
– HappyMe
Sep 8 '16 at 14:58
2
The favicon mechanism has definitely evolved over the years. I noticed today the spec at MDN now says: The shortcut link type is often seen before icon, but this link type is non-conforming, ignored and web authors must not use it anymore. Meaning use<link ref="icon" ...>
rather than<link ref="shortcut icon" ...>
developer.mozilla.org/en-US/docs/Web/HTML/Link_types
– broc.seib
Jun 5 '18 at 14:42
1
Thank you @broc.seib for the feedback. At time of writing this comment, I lost track of why it was "shortcut icon" and not "icon". Sure, Mozilla has its voice in this story. But we must not forget why this declaration is here in the first place: to support legacy browsers, such as IE 8. Most recent browsers use PNG icons, which are cleaner and lighter than ICO. My plan for RealFavicon is to remove this declaration completely. Before this, I need to run tests on IE 7, 8 and 9.
– philippe_b
Jun 5 '18 at 17:00
Not to mention, that if you "view source" on this page, on Stack Overflow,ref="shortcut icon"
is exactly what they use.
– Steven Ventimiglia
Jan 3 at 19:57
Am I missing something (history) or this doesn't answer the actual question - what's the difference between/favicon.ico
vs<link rel="shortcut icon" />
?
– laggingreflex
Mar 8 at 4:29
|
show 1 more comment
There are several ways to create a favicon. The best way for you depends on various factors:
- The time you can spend on this task. For many people, this is "as quick as possible".
- The efforts you are willing to make. Like, drawing a 16x16 icon by hand for better results.
- Specific constraints, like supporting a specific browser with odd specs.
First method: Use a favicon generator
If you want to get the job done well and quickly, you can use a favicon generator. This one creates the pictures and HTML code for all major desktop and mobiles browsers. Full disclosure: I'm the author of this site.
Advantages of such solution: it's quick and all compatibility considerations were already addressed for you.
Second method: Create a favicon.ico (desktop browsers only)
As you suggest, you can create a favicon.ico
file which contains 16x16 and 32x32 pictures (note that Microsoft recommends 16x16, 32x32 and 48x48).
Then, declare it in your HTML code:
<link rel="shortcut icon" href="/path/to/icons/favicon.ico">
This method will work with all desktop browsers, old and new. But most mobile browsers will ignore the favicon.
About your suggestion of placing the favicon.ico
file in the root and not declaring it: beware, although this technique works on most browsers, it is not 100% reliable. For example Windows Safari cannot find it (granted: this browser is somehow deprecated on Windows, but you get the point). This technique is useful when combined with PNG icons (for modern browsers).
Third method: Create a favicon.ico, a PNG icon and an Apple Touch icon (all browsers)
In your question, you do not mention the mobile browsers. Most of them will ignore the favicon.ico
file. Although your site may be dedicated to desktop browsers, chances are that you don't want to ignore mobile browsers altogether.
You can achieve a good compatibility with:
favicon.ico
, see above.- A 192x192 PNG icon for Android Chrome
- A 180x180 Apple Touch icon (for iPhone 6 Plus; other device will scale it down as needed).
Declare them with
<link rel="shortcut icon" href="/path/to/icons/favicon.ico">
<link rel="icon" type="image/png" href="/path/to/icons/favicon-192x192.png" sizes="192x192">
<link rel="apple-touch-icon" sizes="180x180" href="/path/to/icons/apple-touch-icon-180x180.png">
This is not the full story, but it's good enough in most cases.
There are several ways to create a favicon. The best way for you depends on various factors:
- The time you can spend on this task. For many people, this is "as quick as possible".
- The efforts you are willing to make. Like, drawing a 16x16 icon by hand for better results.
- Specific constraints, like supporting a specific browser with odd specs.
First method: Use a favicon generator
If you want to get the job done well and quickly, you can use a favicon generator. This one creates the pictures and HTML code for all major desktop and mobiles browsers. Full disclosure: I'm the author of this site.
Advantages of such solution: it's quick and all compatibility considerations were already addressed for you.
Second method: Create a favicon.ico (desktop browsers only)
As you suggest, you can create a favicon.ico
file which contains 16x16 and 32x32 pictures (note that Microsoft recommends 16x16, 32x32 and 48x48).
Then, declare it in your HTML code:
<link rel="shortcut icon" href="/path/to/icons/favicon.ico">
This method will work with all desktop browsers, old and new. But most mobile browsers will ignore the favicon.
About your suggestion of placing the favicon.ico
file in the root and not declaring it: beware, although this technique works on most browsers, it is not 100% reliable. For example Windows Safari cannot find it (granted: this browser is somehow deprecated on Windows, but you get the point). This technique is useful when combined with PNG icons (for modern browsers).
Third method: Create a favicon.ico, a PNG icon and an Apple Touch icon (all browsers)
In your question, you do not mention the mobile browsers. Most of them will ignore the favicon.ico
file. Although your site may be dedicated to desktop browsers, chances are that you don't want to ignore mobile browsers altogether.
You can achieve a good compatibility with:
favicon.ico
, see above.- A 192x192 PNG icon for Android Chrome
- A 180x180 Apple Touch icon (for iPhone 6 Plus; other device will scale it down as needed).
Declare them with
<link rel="shortcut icon" href="/path/to/icons/favicon.ico">
<link rel="icon" type="image/png" href="/path/to/icons/favicon-192x192.png" sizes="192x192">
<link rel="apple-touch-icon" sizes="180x180" href="/path/to/icons/apple-touch-icon-180x180.png">
This is not the full story, but it's good enough in most cases.
answered Sep 21 '14 at 16:34
philippe_bphilippe_b
26.5k64136
26.5k64136
5
Actually, the still often used <link rel="shortcut icon" href="/path/to/icons/favicon.ico"> is not a valid option. It is not even standard and only IE supports it. And as of IE 9, IE support the default 'look at root' method. So it is not a way to support all browsers, but just a way to support IE < 9. Rely on the (now standard) 'place in root' method or, if you insist, add: <link rel="icon" href="/favicon.ico"> (Even though this isnt standard either)
– HappyMe
Sep 8 '16 at 14:58
2
The favicon mechanism has definitely evolved over the years. I noticed today the spec at MDN now says: The shortcut link type is often seen before icon, but this link type is non-conforming, ignored and web authors must not use it anymore. Meaning use<link ref="icon" ...>
rather than<link ref="shortcut icon" ...>
developer.mozilla.org/en-US/docs/Web/HTML/Link_types
– broc.seib
Jun 5 '18 at 14:42
1
Thank you @broc.seib for the feedback. At time of writing this comment, I lost track of why it was "shortcut icon" and not "icon". Sure, Mozilla has its voice in this story. But we must not forget why this declaration is here in the first place: to support legacy browsers, such as IE 8. Most recent browsers use PNG icons, which are cleaner and lighter than ICO. My plan for RealFavicon is to remove this declaration completely. Before this, I need to run tests on IE 7, 8 and 9.
– philippe_b
Jun 5 '18 at 17:00
Not to mention, that if you "view source" on this page, on Stack Overflow,ref="shortcut icon"
is exactly what they use.
– Steven Ventimiglia
Jan 3 at 19:57
Am I missing something (history) or this doesn't answer the actual question - what's the difference between/favicon.ico
vs<link rel="shortcut icon" />
?
– laggingreflex
Mar 8 at 4:29
|
show 1 more comment
5
Actually, the still often used <link rel="shortcut icon" href="/path/to/icons/favicon.ico"> is not a valid option. It is not even standard and only IE supports it. And as of IE 9, IE support the default 'look at root' method. So it is not a way to support all browsers, but just a way to support IE < 9. Rely on the (now standard) 'place in root' method or, if you insist, add: <link rel="icon" href="/favicon.ico"> (Even though this isnt standard either)
– HappyMe
Sep 8 '16 at 14:58
2
The favicon mechanism has definitely evolved over the years. I noticed today the spec at MDN now says: The shortcut link type is often seen before icon, but this link type is non-conforming, ignored and web authors must not use it anymore. Meaning use<link ref="icon" ...>
rather than<link ref="shortcut icon" ...>
developer.mozilla.org/en-US/docs/Web/HTML/Link_types
– broc.seib
Jun 5 '18 at 14:42
1
Thank you @broc.seib for the feedback. At time of writing this comment, I lost track of why it was "shortcut icon" and not "icon". Sure, Mozilla has its voice in this story. But we must not forget why this declaration is here in the first place: to support legacy browsers, such as IE 8. Most recent browsers use PNG icons, which are cleaner and lighter than ICO. My plan for RealFavicon is to remove this declaration completely. Before this, I need to run tests on IE 7, 8 and 9.
– philippe_b
Jun 5 '18 at 17:00
Not to mention, that if you "view source" on this page, on Stack Overflow,ref="shortcut icon"
is exactly what they use.
– Steven Ventimiglia
Jan 3 at 19:57
Am I missing something (history) or this doesn't answer the actual question - what's the difference between/favicon.ico
vs<link rel="shortcut icon" />
?
– laggingreflex
Mar 8 at 4:29
5
5
Actually, the still often used <link rel="shortcut icon" href="/path/to/icons/favicon.ico"> is not a valid option. It is not even standard and only IE supports it. And as of IE 9, IE support the default 'look at root' method. So it is not a way to support all browsers, but just a way to support IE < 9. Rely on the (now standard) 'place in root' method or, if you insist, add: <link rel="icon" href="/favicon.ico"> (Even though this isnt standard either)
– HappyMe
Sep 8 '16 at 14:58
Actually, the still often used <link rel="shortcut icon" href="/path/to/icons/favicon.ico"> is not a valid option. It is not even standard and only IE supports it. And as of IE 9, IE support the default 'look at root' method. So it is not a way to support all browsers, but just a way to support IE < 9. Rely on the (now standard) 'place in root' method or, if you insist, add: <link rel="icon" href="/favicon.ico"> (Even though this isnt standard either)
– HappyMe
Sep 8 '16 at 14:58
2
2
The favicon mechanism has definitely evolved over the years. I noticed today the spec at MDN now says: The shortcut link type is often seen before icon, but this link type is non-conforming, ignored and web authors must not use it anymore. Meaning use
<link ref="icon" ...>
rather than <link ref="shortcut icon" ...>
developer.mozilla.org/en-US/docs/Web/HTML/Link_types– broc.seib
Jun 5 '18 at 14:42
The favicon mechanism has definitely evolved over the years. I noticed today the spec at MDN now says: The shortcut link type is often seen before icon, but this link type is non-conforming, ignored and web authors must not use it anymore. Meaning use
<link ref="icon" ...>
rather than <link ref="shortcut icon" ...>
developer.mozilla.org/en-US/docs/Web/HTML/Link_types– broc.seib
Jun 5 '18 at 14:42
1
1
Thank you @broc.seib for the feedback. At time of writing this comment, I lost track of why it was "shortcut icon" and not "icon". Sure, Mozilla has its voice in this story. But we must not forget why this declaration is here in the first place: to support legacy browsers, such as IE 8. Most recent browsers use PNG icons, which are cleaner and lighter than ICO. My plan for RealFavicon is to remove this declaration completely. Before this, I need to run tests on IE 7, 8 and 9.
– philippe_b
Jun 5 '18 at 17:00
Thank you @broc.seib for the feedback. At time of writing this comment, I lost track of why it was "shortcut icon" and not "icon". Sure, Mozilla has its voice in this story. But we must not forget why this declaration is here in the first place: to support legacy browsers, such as IE 8. Most recent browsers use PNG icons, which are cleaner and lighter than ICO. My plan for RealFavicon is to remove this declaration completely. Before this, I need to run tests on IE 7, 8 and 9.
– philippe_b
Jun 5 '18 at 17:00
Not to mention, that if you "view source" on this page, on Stack Overflow,
ref="shortcut icon"
is exactly what they use.– Steven Ventimiglia
Jan 3 at 19:57
Not to mention, that if you "view source" on this page, on Stack Overflow,
ref="shortcut icon"
is exactly what they use.– Steven Ventimiglia
Jan 3 at 19:57
Am I missing something (history) or this doesn't answer the actual question - what's the difference between
/favicon.ico
vs <link rel="shortcut icon" />
?– laggingreflex
Mar 8 at 4:29
Am I missing something (history) or this doesn't answer the actual question - what's the difference between
/favicon.ico
vs <link rel="shortcut icon" />
?– laggingreflex
Mar 8 at 4:29
|
show 1 more comment
- you can work with this website for generate favin.ico
- I recommend use .ico format because the png don't work with method 1 and ico could have more detail!
- both method work with all browser but when it's automatically work what you want type a code for it? so i think method 1 is better.
add a comment |
- you can work with this website for generate favin.ico
- I recommend use .ico format because the png don't work with method 1 and ico could have more detail!
- both method work with all browser but when it's automatically work what you want type a code for it? so i think method 1 is better.
add a comment |
- you can work with this website for generate favin.ico
- I recommend use .ico format because the png don't work with method 1 and ico could have more detail!
- both method work with all browser but when it's automatically work what you want type a code for it? so i think method 1 is better.
- you can work with this website for generate favin.ico
- I recommend use .ico format because the png don't work with method 1 and ico could have more detail!
- both method work with all browser but when it's automatically work what you want type a code for it? so i think method 1 is better.
edited Jan 5 '17 at 18:42
Matthias
3,62454075
3,62454075
answered Sep 20 '14 at 20:28
amir2hamir2h
1189
1189
add a comment |
add a comment |
I used https://iconifier.net
I uploaded my image, downloaded images zip file, added images to my server, followed the directions on the site including adding the links to my index.html and it worked. My favicon now shows on my iPhone in Safari when 'Add to home screen'
add a comment |
I used https://iconifier.net
I uploaded my image, downloaded images zip file, added images to my server, followed the directions on the site including adding the links to my index.html and it worked. My favicon now shows on my iPhone in Safari when 'Add to home screen'
add a comment |
I used https://iconifier.net
I uploaded my image, downloaded images zip file, added images to my server, followed the directions on the site including adding the links to my index.html and it worked. My favicon now shows on my iPhone in Safari when 'Add to home screen'
I used https://iconifier.net
I uploaded my image, downloaded images zip file, added images to my server, followed the directions on the site including adding the links to my index.html and it worked. My favicon now shows on my iPhone in Safari when 'Add to home screen'
answered May 15 '18 at 0:13
HbleggHblegg
18829
18829
add a comment |
add a comment |
I think so everything that is most important has already been said.
Let me only add that this declaration allows you to put a movable GIF in the place of favicon:
<link rel="shortcut icon" href="img/icon.gif" />
This is happens on some pages. The effect of the moving favicon makes the card of this website stand out from the other cards.
Unfortunately, this behavior and this property are not guaranteed by any of the browsers. Even Firefox, on which I observed it one day, on the second day displayed a standard empty icon in place of a GIF for the same page.
add a comment |
I think so everything that is most important has already been said.
Let me only add that this declaration allows you to put a movable GIF in the place of favicon:
<link rel="shortcut icon" href="img/icon.gif" />
This is happens on some pages. The effect of the moving favicon makes the card of this website stand out from the other cards.
Unfortunately, this behavior and this property are not guaranteed by any of the browsers. Even Firefox, on which I observed it one day, on the second day displayed a standard empty icon in place of a GIF for the same page.
add a comment |
I think so everything that is most important has already been said.
Let me only add that this declaration allows you to put a movable GIF in the place of favicon:
<link rel="shortcut icon" href="img/icon.gif" />
This is happens on some pages. The effect of the moving favicon makes the card of this website stand out from the other cards.
Unfortunately, this behavior and this property are not guaranteed by any of the browsers. Even Firefox, on which I observed it one day, on the second day displayed a standard empty icon in place of a GIF for the same page.
I think so everything that is most important has already been said.
Let me only add that this declaration allows you to put a movable GIF in the place of favicon:
<link rel="shortcut icon" href="img/icon.gif" />
This is happens on some pages. The effect of the moving favicon makes the card of this website stand out from the other cards.
Unfortunately, this behavior and this property are not guaranteed by any of the browsers. Even Firefox, on which I observed it one day, on the second day displayed a standard empty icon in place of a GIF for the same page.
answered Oct 11 '18 at 10:03
simhumilecosimhumileco
7,89735757
7,89735757
add a comment |
add a comment |
protected by cassiomolin Nov 1 '18 at 14:44
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?