Html 5 Favicon - Support?
To link a favicon to your site in HTML5, set the rel
attribute to "icon"
or "shortcut icon"
and use href
to map to the favicon's file path:
Boost compatibility by incorporating multiple sizes and formats:
Don't forget: the sizes
attributes should mirror your favicon's actual dimensions. Utilize formats like .png and .svg to ensure sharp visuals on all platforms.
Adjusting to browser eccentricities
It's vital to identify and navigate the peculiarities of various browsers. Let's dive into some crucial aspects:
Internet Explorer Vol. 11: The PNG Saga
Though Internet Explorer (IE) lagged behind in supporting PNG favicons, it caught up by Version 11. Make use of conditional comments for IE9 and prior, connecting a 32x32 .ico
favicon, preferred by these legacy versions.
Microsoft Tile Story: A New Dawn
IE11 and Edge have introduced custom tiles for Windows 8.1+ . Design and link a .xml
file for Windows to use, providing additional metadata for creating a mosaic of pinned tiles on the start screen.
Mobile pandering - an essential!
As the mobile web audience proliferates, it's vital to cater to devices with apple-touch icons and icons in manifest.json
. These ensure smooth visuals when your site is saved to home screens. The apple-touch-icon
should not have the rel="apple-touch-icon-precomposed"
as it’s been given the iOS pink slip (deprecated); devices now automatically deal with gloss, effects, and your taxes (not really, but almost).
The niche browser notches
Opera’s Coast browser and Google TV also harbour specific favicon dimensions they look for, such as a 228x228 icon and a 96x96 icon, respectively. It's always hack-o-clock, so please check documentation for niche browser specifics.
Favicon Strategy for the Wide Web
To deliver the most holistic favicon experience, consider these action points:
Favicon for every browser
By providing a native .ico
file for backward compatibility and a .png
version for modern browsers, you ensure all browsers eat from your plate.
Gearing up for niche devices
Devices like Windows Phone are pickier, requesting a 768x768 square image when your site is pinned on the start screen:
Stay tuned to evolving best practices - much like your favorite thriller show, the web standards screenplay is always changing! The story arch of apple-touch-icon-precomposed
is an apt illustration.
Ensure you specify the size of every favicon; for browsers without solid size attribute support, this assists them in picking the perfect favicon to display.
Was this article helpful?