Website Favicon Guide: Recommended Sizes, Formats & iOS Requirements
Adding Favicons to the Website
Favicons are one of the most common web page elements used in web development. Implementing them is easy and essential for websites. This article provides insights into adding favicons, helping beginners in web design.
A favicon is a graphic image that acts as an identity for a website. It can appear in various places such as the website's title bar, address bar, desktop shortcuts, history, and bookmarks. Once your site is added to favorites or the home screen, favicons are displayed as representations of your site.
The image used for favicons can typically be a square, with common sizes being 16x16 pixels. Other sizes, such as 32x32, 48x48, or 64x64 pixels, are also supported.
The file format for favicons can be .png, .gif, .ico, and the following code can be added to the header of your page (or all pages on your website) for proper implementation.
iOS Safari Favicon Requirements
iOS Safari searches for icons with the prefix:
- apple-touch-icon
- apple-touch-icon-precomposed
The appropriate size for iOS devices is 57x57 pixels, and the directory should list icons as follows:
- apple-touch-icon-57x57-precomposed.png
- apple-touch-icon-57x57.png
- apple-touch-icon-precomposed.png
- apple-touch-icon.png
Browser Favicon Compatibility
If both PNG and ICO favicons are available, browsers select the format and size according to the following rules:
- Firefox and Safari will use the favicon that comes last in the list.
- Chrome for Mac will use the ICO format favicon, or the 32x32 favicon if ICO is unavailable.
- Chrome for Mac will scale down the 32x32 favicon to 16x16 on non-retina devices.
- Chrome for Windows will use the first available favicon, prioritizing the 16x16 ICO favicon.
- Opera will randomly select from any available icon.
Comments
Post a Comment