Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Favicon

From Wikipedia, the free encyclopedia
Icon associated with a particular web site

Wikipedia's favicon, shown inFirefox

Afavicon (/ˈfæv.ɪˌkɒn/; short forfavorite icon), also known as ashortcut icon,website icon,tab icon,URL icon, orbookmark icon, is a file containing one or more smallicons[1] associated with a particularwebsite orweb page.[1][2] Aweb designer can create such an icon and upload it to a website (or web page) by several means, and graphicalweb browsers will then make use of it.[3] Browsers that provide favicon support typically display a page's favicon in the browser'saddress bar (sometimes in the history as well) and next to the page's name in a list ofbookmarks.[3] Browsers that support atabbed document interface typically show a page's favicon next to the page's title on the tab, andsite-specific browsers use the favicon as adesktop icon.[1]

History

[edit]

In March 1999,Microsoft releasedInternet Explorer 5, which supported favicons for the first time.[4] Originally, the favicon was afile calledfavicon.ico placed in theroot directory of a website. It was used inInternet Explorer'sfavorites (bookmarks) and next to theURL in the address bar if the page was bookmarked.[4][5][6][7] A side effect was that the number of visitors who had bookmarked the page could be estimated by the requests of the favicon. This side effect no longer works, as all modern browsers load the favicon file to display in their web address bar, regardless of whether the site is bookmarked.[6]

Standardization

[edit]

In 2003, the.ico format was registered by a third party with theInternet Assigned Numbers Authority (IANA) under theMIME typeimage/vnd.microsoft.icon.[8][9] However, when using the.ico format to display as images (that is, not as favicon), Internet Explorer cannot display files served with this standardized MIME type.[9] Aworkaround for Internet Explorer is to associate.ico with the non-standardimage/x-icon MIME type in web servers.[10]

RFC 5988 established an IANA link relation registry,[11] andrel="icon" was registered in 2010 based on theHTML5 specification. The popular<link rel="shortcut icon" type="image/png" href="image/favicon.png"> theoretically identifies two relations,shortcut andicon, butshortcut is not registered and is redundant. In 2011 theHTML living standard[12] specified that for historical reasonsshortcut is allowed immediately beforeicon;[13] however,shortcut does not have a meaning in this context.

Legacy

[edit]

Internet Explorer 5–10 supports only theICO file format.Netscape 7 and Internet Explorer versions 5 and6 display the favicon only when the page is bookmarked, and not simply when the pages are visited as in later browsers.[4]

Examples of favicons

[edit]

Browser implementation

[edit]

The following tables illustrate support of various features with major web browsers. Unless noted, the version numbers indicate the starting version number of a supported feature.

Image file format support

[edit]

The following table illustrates theimage file format support for the favicon.

BrowserImage file format
ICOPNGGIFAnimated GIFsJPEGAPNGSVG
EdgeYesYesYesNoYesUnknownYes
Firefox1.0[14]1.0[14]1.0[14]Yes[15]Yes3.0[15]41.0[16]
Google ChromeYesYes4.0No[17][18]4.0No80[19]
Internet Explorer5.0[20]11.0[21]11.0[21]No[20]No[20]No[20]No[22]
Opera7.0[23]7.0[23]7.0[23]7.0[23]7.0[23]9.544.0[24]
SafariYes4.04.0No4.0NoNon-standard (12.0)[a][25][26]

Additionally, such icon files can be 16×16, 32×32, 48×48, or 64×64pixels in size, and 8-bit, 24-bit, or 32-bit incolor depth.[1][3] TheICO file format article explains the details for icons with more than 256 colors on variousMicrosoft Windows platforms.

Use of favicon

[edit]

This table illustrates the different areas of the browser where favicons can be displayed.

BrowserAddress barAddress bar drop-down listLinks barBookmarksTabsDrag to desktop
EdgeNoYesYesYesYesYes
Firefox1.0–12.0: Yes[27]
> v13: No[28]
YesYesYes[27]Yes[27]Yes[27]
Google ChromeNo[27]NoYes[27]Yes[27]1.0[27]No[27]
Internet Explorer7.0[27]No5.0[27]5.0[27]7.0[27]5.0[27]
Opera7.0–12.17: Yes
> v14: No[27]
No7.0[27]7.0[27]7.0[27]7.0[27]
SafariYes[27]YesNo[27]Yes[27]1.0–8.0: Yes
9.0–11.0: No
> 12.0: Optional[29]
No[27]

Opera Software added the ability to change the favicon in theSpeed Dial inOpera 10.[30]

How to use

[edit]

This table illustrates the different ways the favicon can be recognized by the web browser. The standard implementation uses alink element with arel attribute in the<head> section of the document to specify the file's format, name and location.

EdgeFirefoxGoogle ChromeInternet ExplorerOperaSafari
<linkrel="shortcut icon"href="https://example.com/myicon.ico">
Yes[4]Yes[4]Yes[4]Yes[4][20]Yes[4]Yes
<linkrel="icon"type="image/vnd.microsoft.icon"href="https://example.com/image.ico">
YesYesYesYes (from IE 9)[21]YesYes
<linkrel="icon"type="image/x-icon"href="https://example.com/image.ico">
Yes[4]Yes[4]Yes[4]Yes (from IE 9)[31]Yes[4]Yes
<linkrel="icon"href="https://example.com/image.ico">
YesYesYesYes (from IE 11)[21]YesYes
<linkrel="icon"type="image/gif"href="https://example.com/image.gif">
YesYesYesYes (from IE 11)[21]YesYes
<linkrel="icon"type="image/png"href="https://example.com/image.png">
YesYesYesYes (from IE 11)[21]YesYes
<linkrel="icon"type="image/svg+xml"href="https://example.com/image.svg">
YesYesYesYesYesNo
<linkrel="mask-icon"href="https://example.com/image.svg"color="red">
NoNoNoNoNoYes[32]
favicon.ico located in the website's rootYes[citation needed]Optional[b]YesYesOptional[c]Yes
precedence: prefer root or (X)HTML linked versionlinked[27]linked[27]linked[27]linked[27]??
  1. ^Safari, since version 12.0, supports single-color SVG favicons in some cases in a non-standardmask-icon format.
  2. ^Firefox only acceptsfavicon.ico in the website's root without a<link> tag if the settingbrowser.chrome.site_icons is set totrue inabout:config. The default value istrue. If set tofalse, these favicons are ignored.
  3. ^Opera loads/favicon.ico only ifMultimedia/Always load favicon option inopera:config is set to1. SeeOpera Support page for more details.

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.[33]

HTML5 recommendation for icons in multiple sizes

[edit]

The currentHTML5 specification recommends specifying multiple sizes for the icons, using the attributesrel="icon" sizes="space-separated list of icon dimensions" within a<link> tag.[34] Multiple icon formats, including container formats such as Microsoft.ico and Macintosh.icns files, as well asScalable Vector Graphics may be provided by including the icon'scontent type in the formattype="file content-type" within the<link> tag.

As ofiOS 5, Apple mobile devices ignore the HTML5 recommendation and instead use the proprietaryapple-touch-icon method detailed below. TheGoogle Chrome web browser however, will select the closest matching size from those provided in the HTML headers to create 128×128 pixelapplication icons, when the user chooses theCreate application shortcuts... from the "Tools" menu.

Home screen icons on mobile devices

[edit]

On mobile devices, users can pin web pages as shortcuts icons to theirhome screen. These shortcut icons look similar to regular apps and web developers can provide dedicated icons for them.

Apple devices

[edit]

ForApple devices with theiOSoperating system version 1.1.3 or later, users can pin a website to the home screen using theAdd to Home Screen button within the share sheet in Safari.[35][36]

This works for any website. But for iOS to display the shortcut with an icon, the website needs to supply a<link rel="apple-touch-icon" ...> in the<head> section of documents served by the website. If the custom icon is not provided, athumbnail of the web page will be put on the home screen instead.[37]

The app icon sizes on the different device classes differ. The recommended sizes for the icons are 152×152 for iPads (untiliPad 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 withrel="apple-touch-icon" and scale it automatically.[38]

Example code[39]
<!-- For iPad --><linkrel="apple-touch-icon"type="image/png"sizes="167x167"href="favicon-167x167.png">
<!-- For iPhone --><linkrel="apple-touch-icon"type="image/png"sizes="180x180"href="favicon-180x180.png">

The icon file referenced byapple-touch-icon is modified to add rounded corners. On the iOS versions prior to iOS 7, a drop shadow, and reflective shine would be added, andapple-touch-icon-precomposed icon may be provided to instruct devices not to apply reflective shine on the image.[36][37]

No HTML is required by browsers or mobile devices to retrieve these icons.[37] The website's root is the default location for the fileapple-touch-icon.png (in order of priority).[36][37]

Android devices

[edit]

OnAndroid devices, users can use theAdd to home screen function inChrome's tools menu to pin a web page to their home screen.

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.[40]

Example code[39]
<!-- For Android --><linkrel="icon"type="image/png"sizes="48x48"href="favicon-48x48.png"><linkrel="icon"type="image/png"sizes="192x192"href="favicon-192x192.png">

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.[41] However, providing a web manifest file is not necessary for theAdd to home screen feature to work.[39]

Animated favicons

[edit]

Various browsers such as Firefox and Opera support animation of favicons. A bug report has been open for Firefox since 2001 requesting a way to disable this feature.[42][43]

Limitations and criticism

[edit]

Due to the need always to check for it in a fixed location, the favicon can lead to artificially slow page-load time and unnecessary 404 entries in the server log if it is nonexistent.[6]

The W3C did not standardize the rel-attribute, so there are other keywords such asshortcut icon that are also accepted by theuser agent.[44][20]

Favicons are often manipulated as part of phishing or eavesdropping attacks againstHTTPS 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 likeTLS. 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. Automatedman-in-the-middle attack tools such assslstrip utilize this trick.[45] 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.[46]

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).[47]

In 2021, a method forbrowser tracking using favicons was demonstrated by researchers at the University of Illinois.[48]

References

[edit]
  1. ^abcdLane, Dave (9 August 2008)."Creating a Multi-Resolution Favicon Including Transparency with the GIMP".Egressive.com. Archived fromthe original on 25 December 2010. Retrieved25 February 2011.
  2. ^"What's With Google's New Mini Icon?". BBC. 20 January 2009.Archived from the original on 30 December 2017. Retrieved25 February 2011.That 16x16 pixel square is the size of the favicon in question, if not the scope.
  3. ^abcApple, Jennifer."Favicon — How To Create A Favicon.ico". Photoshopsupport.com.Archived from the original on 12 October 2004. Retrieved25 February 2011.
  4. ^abcdefghijkl"How to Add a Shortcut Icon to a Web Page".Microsoft Developer Network. Microsoft. Archived fromthe original on 5 January 2018. Retrieved15 March 2010.
  5. ^McGrew, Darin (26 April 2007)."Web Authoring FAQ – 8.11. How can I have a custom icon when people bookmark my site?".htmlhelp.com.Archived from the original on 16 December 2019. Retrieved23 February 2011.
  6. ^abcHeng, Christopher (7 September 2008)."What is Favicon.ico? Personalise Your Site's Bookmarks". thesitewizard.com. Retrieved23 February 2011.
  7. ^"Creating favicons with Adobe Photoshop and GoLive".Adobe GoLive. Archived from the original on 7 December 2003. Retrieved25 February 2011.
  8. ^Butcher, Simon (3 September 2003)."Published specification". Internet Assigned Numbers Authority.Archived from the original on 4 October 2003. Retrieved25 February 2011.
  9. ^ab"IE9 RC Minor Changes List".IEInternals.Archived from the original on 24 March 2016. Retrieved7 April 2016.
  10. ^Irish, Paul (15 December 2010)."commit 37b5fec090d00f38de64 to paulirish's html5-boilerplate".GitHub.Archived from the original on 18 October 2015. Retrieved25 February 2011.
  11. ^"Link Relations".IANA.Archived from the original on 30 April 2020. Retrieved1 November 2020.
  12. ^Ian Hickson (19 January 2011)."HTML is the new HTML5".The WHATWG Blog.WHATWG.Archived from the original on 6 October 2019. Retrieved10 August 2011.
  13. ^"HTML attribute: rel - #icon".
  14. ^abcDavid (19 July 2003)."Mozilla 0.9.6 Release Notes".Mozilla.Archived from the original on 19 September 2018. Retrieved23 February 2011.
  15. ^ab"Bug 111373: don't allow animated site icons (favicons)".Archived from the original on 9 October 2019. Retrieved1 June 2014.
  16. ^Daniel Holbert (12 June 2015)."Bug 366324 – SVG site icons (favicons, shortcut icons) support – comment 55".Bugzilla@Mozilla. Mozilla.Archived from the original on 9 October 2019. Retrieved12 June 2015.
  17. ^tracker, chromium."no movement in favicon". chromium.org.Archived from the original on 18 February 2019. Retrieved11 April 2016.
  18. ^tracker, chromium."Animated Favicons not supported". chromium.org.Archived from the original on 8 November 2018. Retrieved8 November 2018.
  19. ^"Support for SVG in favicons - Chrome Platform Status". 19 November 2019.Archived from the original on 4 January 2020. Retrieved16 January 2020.
  20. ^abcdefDavis, Jeff (27 December 2007)."why doesn't the favicon for my site appear in IE7?".jeffdav on code. Microsoft.Archived from the original on 9 June 2019. Retrieved11 March 2013.
  21. ^abcdefEric Lawrence (7 September 2013)."Fun with Favicons". Microsoft. Archived fromthe original on 23 May 2021. Retrieved25 June 2022.
  22. ^"SVG favicon support". Microsoft Connect. 3 May 2013.Archived from the original on 21 June 2016. Retrieved4 September 2014.
  23. ^abcde"Opera 7 for Windows Changelog". Opera Software. 28 January 2003.Archived from the original on 21 January 2012. Retrieved28 February 2011.
  24. ^"What's new in Opera". Opera Software.Archived from the original on 28 March 2019. Retrieved24 June 2017.
  25. ^"Safari Technology Preview 58, with Safari 12 Features, is Now Available". WebKit. 6 June 2018.Archived from the original on 6 March 2019. Retrieved3 March 2019.
  26. ^"Favicons. Finally". Iconfactory. 7 June 2018.Archived from the original on 1 July 2019. Retrieved3 March 2019.
  27. ^abcdefghijklmnopqrstuvwxyzaaFrancis, Lewis (11 December 2007)."Chart of modern browser support for favicon". informationgift.com.Archived from the original on 10 October 2019. Retrieved23 February 2011.
  28. ^"Firefox deems favicons risky, banishes them from address bar".Engadget.Archived from the original on 19 September 2018. Retrieved10 September 2012.
  29. ^"How to enable favicons in Safari so you can identify websites in tabs graphically". iDownloadBlog. 14 June 2018.Archived from the original on 23 October 2020. Retrieved14 October 2020.
  30. ^"Opera 10.0 beta 2 for Windows changelog". Opera Software. 16 July 2009.Archived from the original on 27 July 2017. Retrieved27 February 2011.
  31. ^"IE9 RC Minor Changes List". Microsoft. 11 February 2011.Archived from the original on 18 October 2015. Retrieved16 November 2013.
  32. ^"Creating Pinned Tab Icons". Apple Inc. 12 December 2016.Archived from the original on 9 December 2019. Retrieved9 April 2019.
  33. ^Jonathan T. Neal (16 January 2013)."Understand the Favicon". Archived fromthe original on 23 May 2013. Retrieved30 May 2013.
  34. ^"HTML Living Standard, Section 4.6.6.6 'Link type "icon"'". WHATWG.Archived from the original on 21 December 2019. Retrieved17 November 2015.
  35. ^"iPhone Human Interface Guidelines for Web Applications: Metrics, Layout Guidelines, and Tips". Apple Inc. Archived fromthe original on 4 June 2010. Retrieved27 May 2010.
  36. ^abc"Safari Web Content Guide: Specifying a Webpage Icon for Web Clip". Apple Inc. 15 November 2010.Archived from the original on 20 May 2023. Retrieved2 June 2023.
  37. ^abcdMcLellan, Drew (17 January 2008)."How To Set an Apple Touch Icon for Any Site". Allinthe head.com.Archived from the original on 4 April 2019. Retrieved11 March 2011.
  38. ^"Configuring Web Applications".developer.apple.com.Archived from the original on 20 May 2023. Retrieved3 July 2021.
  39. ^abc"How to add a favicon to your website – The modern browser guide".Loqbooq Blog.Archived from the original on 11 July 2021. Retrieved3 July 2021.
  40. ^"Material Design".Material Design.Archived from the original on 28 May 2018. Retrieved3 July 2021.
  41. ^"Add to Home screen - Progressive web apps (PWAs) | MDN".developer.mozilla.org. Retrieved3 July 2021.
  42. ^"Bug 111373 - don't allow animated site icons (favicons)". bugzilla.mozilla.org. 21 November 2001.Archived from the original on 9 October 2019. Retrieved1 June 2014.
  43. ^"Firefox Bug 111373 - don't allow animated site icons (mozilla.org)". Hacker News. 7 July 2015.Archived from the original on 19 September 2018. Retrieved7 July 2015.
  44. ^Dubost, Karl (24 October 2005)."How to Add a Favicon to your Site". World Wide Web Consortium.Archived from the original on 29 November 2019. Retrieved25 February 2011.
  45. ^Marlinspike, Moxie (21 February 2011)."Defeating Ssl Using Sslstrip (Marlinspike Blackhat)".(see description of video). SecurityTube. Archived fromthe original on 13 July 2011. Retrieved9 July 2011.
  46. ^"Firefox version 14 features". 18 July 2012.Archived from the original on 19 September 2018. Retrieved18 July 2012.
  47. ^Linus, Robin."Your Social Media Fingerprint".Archived from the original on 21 December 2019. Retrieved14 October 2016.
  48. ^Goodin, Dan (19 February 2021)."New browser-tracking hack works even when you flush caches or go incognito".Ars Technica.Archived from the original on 20 February 2021. Retrieved21 February 2021.

External links

[edit]
Look upfavicon in Wiktionary, the free dictionary.
Wikimedia Commons has media related toFavicons.
Features, standards & protocols
Features
Web standards
Protocols
Active
Blink-based
Proprietary
FOSS
Gecko-based
Goanna-based
WebKit-based
Multi-engine
Other
Discontinued
Blink-based
Gecko-based
MSHTML-based
WebKit-based
Other
Retrieved from "https://en.wikipedia.org/w/index.php?title=Favicon&oldid=1338655559"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp