A favicon (; short for favorite icon), also known as a shortcut icon, website icon, tab icon, URL icon, or bookmark icon, is a file containing one or more small icons associated with a particular website or web page. A can create such an icon and upload it to a website (or web page) by several means, and graphical will then make use of it. Browsers that provide favicon support typically display a page's favicon in the browser's address bar (sometimes in the history as well) and next to the page's name in a list of bookmarks. Browsers that support a tabbed document interface typically show a page's favicon next to the page's title on the tab, and site-specific browsers use the favicon as a desktop icon.
RFC 5988 established an IANA link relation registry, and rel="icon" was registered in 2010 based on the HTML5 specification. The popular <link rel="shortcut icon" type="image/png" href="image/favicon.png"> theoretically identifies two relations, shortcut and icon, but shortcut is not registered and is redundant. In 2011 the HTML living standard specified that for historical reasons shortcut is allowed immediately before icon; however, shortcut does not have a meaning in this context.
Microsoft Edge | |||||||
Firefox | |||||||
Google Chrome | |||||||
Internet Explorer | |||||||
Opera | |||||||
Safari |
Edge | ||||||
Firefox | ||||||
Google Chrome | ||||||
Internet Explorer | ||||||
Opera | ||||||
Safari |
Opera Software added the ability to change the favicon in the Speed Dial in Opera 10.
If links for both PNG and ICO favicons are present, PNG-favicon-compatible browsers select which format and size to use as follows. Firefox and Safari will use the favicon that comes last. Chrome for Mac will use whichever favicon is ICO formatted, otherwise the 32×32 favicon. Chrome for Windows will use the favicon that comes first if it is 16×16, otherwise the ICO. If none of the aforementioned options are available, Chrome will use whichever favicon comes first, exactly the opposite of Firefox and Safari. Indeed, Chrome for Mac will ignore the 16×16 favicon and use the 32×32 version, only to scale it back down to 16×16 on non-retina devices. Opera will choose from any of the available icons at random.
Only SeaMonkey does not fetch <nowiki></nowiki> files in the website's root by default.
As of iOS 5, Apple mobile devices ignore the HTML5 recommendation and instead use the proprietary true method detailed below. The Google Chrome web browser however, will select the closest matching size from those provided in the HTML headers to create 128×128 pixel application icons, when the user chooses the Create application shortcuts... from the "Tools" menu.
This works for any website. But for iOS to display the shortcut with an icon, the website needs to supply a in the section of documents served by the website. If the custom icon is not provided, a thumbnail of the web page will be put on the home screen instead.
The app icon sizes on the different device classes differ. The recommended sizes for the icons are 152×152 for iPads (until iPad 2, released in 2011), 167×167 for iPads with Retina screens (iPad 3 and later) and 180×180 for iPhones. If no icon in the matching size is provided, iOS will pick the largest icon with about:config and scale it automatically.
The icon file referenced by true is modified to add rounded corners. On the iOS versions prior to iOS 7, a drop shadow, and reflective shine would be added, and false icon may be provided to instruct devices not to apply reflective shine on the image.
No HTML is required by browsers or mobile devices to retrieve these icons. The website's root is the default location for the file /favicon.ico (in order of priority).
This also works for any website, but if no favicon is provided, a generic icon is used. As Android app icons are sized in 48x48 points, websites should provide favicons sized in multiples of 48x48 pixels. For modern high resolution devices, Google recommends providing icons in 192x192 pixels.
Android also supports Web Manifest files, which makes it possible to integrate web sites deeper within the system. A Web Manifest is a JSON file, that specifies meta data for a progressive web app. It allows the developer to not only provide the icons but also a short name for display on the home screen as well as theme colors. However, providing a web manifest file is not necessary for the Add to home screen feature to work.
The W3C did not standardize the rel-attribute, so there are other keywords such as shortcut icon that are also accepted by the user agent.
Favicons are often manipulated as part of phishing or eavesdropping attacks against HTTPS web pages. Many web browsers display favicons near areas of the web browser's UI, such as the address bar, that are used to convey whether the connection to a website is using a secure protocol like TLS. By changing the favicon to a familiar padlock image an attacker can attempt to trick the user into thinking they are securely connected to the proper website. Automated man-in-the-middle attack tools such as sslstrip utilize this trick. In order to eliminate this, some web browsers, such as Firefox or Google Chrome, display the favicon within the tab whilst displaying the security status of the protocol used to access the website beside the URL.
Since favicons are usually located at the root of the site directory on the server, they can be employed with some reliability to disclose whether a web client is logged into a given service. This works by making use of the redirect-after-login feature of many websites, by querying for the favicon in a redirect-after-login URL and testing the server response to discern whether the user is given the requested resource (which means they are logged in), or instead redirected to the login page (which means that they are not logged into the service).
In 2021, a method for browser tracking using favicons was demonstrated by researchers at the University of Illinois.
|
|