Merge branch 'master' into patch-1

This commit is contained in:
Josh Buchea 2017-04-27 22:40:53 -07:00 committed by GitHub
commit 86cabc1ed0
1 changed files with 55 additions and 167 deletions

222
README.md
View File

@ -7,14 +7,12 @@ A list of everything that could go in the `<head>` of your document
- [Recommended Minimum](#recommended-minimum)
- [Elements](#elements)
- [Meta](#meta)
- [Meta: Not Recommended](#meta-not-recommended)
- [Link](#link)
- [Link: Not Recommended](#link-not-recommended)
- [Favicons](#favicons)
- [Social](#social)
- [Facebook / Open Graph](#facebook--open-graph)
- [Facebook / Instant Articles](#facebook--instant-articles)
- [Twitter](#twitter)
- [Facebook Open Graph](#facebook-open-graph)
- [Facebook Instant Articles](#facebook-instant-articles)
- [Twitter Cards](#twitter-cards)
- [Google+ / Schema.org](#google--schemaorg)
- [OEmbed](#oembed)
- [Browsers / Platforms](#browsers--platforms)
@ -23,7 +21,6 @@ A list of everything that could go in the `<head>` of your document
- [Google Android](#google-android)
- [Google Chrome](#google-chrome)
- [Microsoft Internet Explorer](#microsoft-internet-explorer)
- [Microsoft Internet Explorer: Legacy, Do Not Use!](#microsoft-internet-explorer-legacy-do-not-use)
- [Browsers (Chinese)](#browsers-chinese)
- [360 Browser](#360-browser)
- [QQ Mobile Browser](#qq-mobile-browser)
@ -36,6 +33,7 @@ A list of everything that could go in the `<head>` of your document
- [Other Formats](#other-formats)
- [Translations](#translations)
- [Contributing](#contributing)
- [Contributors](#contributors)
- [Author](#author)
- [License](#license)
@ -46,7 +44,7 @@ Below are the essential tags for basic, minimalist websites:
```html
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Page Title</title>
```
@ -106,20 +104,27 @@ Below are the essential tags for basic, minimalist websites:
<!-- Verify ownership for Google Search Console -->
<meta name="google-site-verification" content="verification_token">
<!-- Verify ownership for Yandex Webmasters -->
<meta name="yandex-verification" content="verification_token">
<!-- Verify ownership for Bing Webmaster Center -->
<meta name="msvalidate.01" content="verification_token">
<!-- Verify ownership for Alexa Console -->
<meta name="alexaVerifyID" content="verification_token">
<!-- Verify ownership for Pinterest Console-->
<meta name="p:domain_verify" content="code from pinterest">
<!-- Verify ownership for Norton Safe Web -->
<meta name="norton-safeweb-site-verification" content="norton code">
<!-- Used to name software used to build the website (i.e. - WordPress, Dreamweaver) -->
<meta name="generator" content="program">
<!-- Short description of your site's subject -->
<meta name="subject" content="your website's subject">
<!-- Very short (10 words or less) description. Primarily for academic papers -->
<meta name="abstract" content="">
<!-- Full domain name or web address -->
<meta name="url" content="https://example.com/">
<meta name="directory" content="submission">
<!-- Gives a general age rating based on sites content -->
<meta name="rating" content="General">
@ -150,67 +155,13 @@ Below are the essential tags for basic, minimalist websites:
- [ICBM on Wikipedia](https://en.wikipedia.org/wiki/ICBM_address#Modern_use)
- [Geotagging on Wikipedia](https://en.wikipedia.org/wiki/Geotagging#HTML_pages)
### Meta: Not Recommended
Below are the meta attributes which are not recommended for use as they had low adoption rate, or have been deprecated:
```html
<!-- Used to declare the document language, but not well supported. Better to use <html lang=""> -->
<meta name="language" content="en">
<!-- Google disregards & Bing considers it an indicator of spam -->
<meta name="keywords" content="your,keywords,here,comma,separated,no,spaces">
<!-- No evidence of current use in any search engines -->
<meta name="revised" content="Sunday, July 18th, 2010, 5:15 pm">
<!-- Provides an easy way for spam bots to harvest email addresses -->
<meta name="reply-to" content="email@example.com">
<!-- Better to use <link rel="author"> or humans.txt file -->
<meta name="author" content="name, email@example.com">
<meta name="designer" content="">
<meta name="owner" content="">
<!-- Tells search bots to revisit the page after a period. This is not supported because most Search Engines now use random intervals for re-crawling a webpage -->
<meta name="revisit-after" content="7 days">
<!-- Sends user to a new URL after a certain amount of time -->
<!-- The W3C recommends that this tag not be used. Google recommends using a server-side 301 redirect instead. -->
<meta http-equiv="refresh" content="300; url=https://example.com/">
<!-- Describes the topic of the website -->
<meta name="topic" content="">
<!-- Brief summary of the company or purpose of the website -->
<meta name="summary" content="">
<!-- A deprecated tag that does the same as the keywords meta tag -->
<meta name="classification" content="business">
<!-- Does the same as URL, older and not supported -->
<meta name="identifier-URL" content="https://example.com/">
<!-- Similar function to the keywords tag -->
<meta name="category" content="">
<!-- Makes sure your website shows up in all countries and languages -->
<meta name="coverage" content="Worldwide">
<!-- Does the same as the coverage tag -->
<meta name="distribution" content="Global">
<!-- Controls what user can access on the internet -->
<meta http-equiv="Pics-label" content="value">
<!-- Cache Control -->
<!-- Better to configure cache control server side -->
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
```
## Link
``` html
<!-- Points to a CSS stylesheet -->
<link rel="stylesheet" href="https://example.com/styles.css">
<!-- Helps prevent duplicate content issues -->
<link rel="canonical" href="https://example.com/2010/06/9-things-to-do-before-entering-social-media.html">
@ -220,9 +171,6 @@ Below are the meta attributes which are not recommended for use as they had low
<!-- Links to an AMP HTML version of the current document -->
<link rel="amphtml" href="https://example.com/path/to/amp-version.html">
<!-- Points to a CSS stylesheet -->
<link rel="stylesheet" href="https://example.com/styles.css">
<!-- Links to a JSON file that specifies "installation" credentials for web applications -->
<link rel="manifest" href="manifest.json">
@ -240,17 +188,11 @@ Below are the meta attributes which are not recommended for use as they had low
<link rel="me" href="mailto:name@example.com">
<link rel="me" href="sms:+15035550125">
<!-- Links to a document that contains an archive link to the current document -->
<link rel="archives" href="https://example.com/2003/05/" title="May 2003">
<!-- Links to a document that describes a collection of records, documents, or other materials of historical interest. -->
<link rel="archives" href="https://example.com/archives/">
<!-- Links to top level resource in an hierarchical structure -->
<link rel="index" href="https://example.com/" title="DeWitt Clinton">
<!-- Gives the starting point of the document -->
<link rel="start" href="https://example.com/photos/pattern_recognition_1_about/" title="Pattern Recognition 1">
<!-- Leads to the preceding resource of the sequence the current document is in -->
<link rel="prev" href="https://example.com/opensearch/opensearch-and-openid-a-sure-way-to-get-my-attention/" title="OpenSearch and OpenID? A sure way to get my attention.">
<link rel="index" href="https://example.com/">
<!-- Gives a self reference - useful when the document has multiple possible references -->
<link rel="self" type="application/atom+xml" href="https://example.com/atomFeed.php?page=3">
@ -258,7 +200,7 @@ Below are the meta attributes which are not recommended for use as they had low
<!-- The first, next, previous, and last documents in a series of documents, respectively -->
<link rel="first" href="https://example.com/atomFeed.php">
<link rel="next" href="https://example.com/atomFeed.php?page=4">
<link rel="previous" href="https://example.com/atomFeed.php?page=2">
<link rel="prev" href="https://example.com/atomFeed.php?page=2">
<link rel="last" href="https://example.com/atomFeed.php?page=147">
<!-- Used when using a 3rd party service to maintain a blog -->
@ -271,7 +213,7 @@ Below are the meta attributes which are not recommended for use as they had low
<link rel="webmention" href="https://example.com/webmention">
<!-- Loads in an external HTML file into the current HTML file -->
<link rel="import" href="component.html">
<link rel="import" href="/path/to/component.html">
<!-- Open Search -->
<link rel="search" href="/open-search.xml" type="application/opensearchdescription+xml" title="Search Title">
@ -289,29 +231,16 @@ Below are the meta attributes which are not recommended for use as they had low
<!-- More info: https://css-tricks.com/prefetching-preloading-prebrowsing/ -->
```
### Link: Not Recommended
Below are the link relations which are not recommended for use:
```html
<link rel="shortcut icon" href="path/to/favicon.ico">
<!-- Not useful, proprietary and buggy, see https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/Y_2eFRh9BOs/gULYapoRBwAJ -->
<link rel="subresource" href="styles.css">
```
### Favicons
``` html
<!-- For IE 10 and below -->
<!-- No link, just place a file called favicon.ico in the root directory -->
<!-- Place favicon.ico in the root directory - no tag necessary -->
<!-- For IE 11, Chrome, Firefox, Safari, Opera -->
<link rel="icon" href="path/to/favicon-16.png" sizes="16x16" type="image/png">
<link rel="icon" href="path/to/favicon-32.png" sizes="32x32" type="image/png">
<link rel="icon" href="path/to/favicon-48.png" sizes="48x48" type="image/png">
<link rel="icon" href="path/to/favicon-62.png" sizes="62x62" type="image/png">
<link rel="icon" href="path/to/favicon-192.png" sizes="192x192" type="image/png">
<!-- More info: https://bitsofco.de/all-about-favicons-and-touch-icons/ -->
<link rel="icon" type="image/png" sizes="16x16" href="/path/to/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="/path/to/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/path/to/favicon-96x96.png">
```
- [All About Favicons (And Touch Icons)](https://bitsofco.de/all-about-favicons-and-touch-icons/)
@ -319,7 +248,7 @@ Below are the link relations which are not recommended for use:
## Social
### Facebook / Open Graph
### Facebook Open Graph
``` html
<meta property="fb:app_id" content="123456789">
@ -331,14 +260,12 @@ Below are the link relations which are not recommended for use:
<meta property="og:site_name" content="Site Name">
<meta property="og:locale" content="en_US">
<meta property="article:author" content="">
<!-- Facebook: https://developers.facebook.com/docs/sharing/webmasters#markup -->
<!-- Open Graph: http://ogp.me/ -->
```
- [Facebook Open Graph Markup](https://developers.facebook.com/docs/sharing/webmasters#markup)
- [Open Graph protocol](http://ogp.me/)
### Facebook / Instant Articles
### Facebook Instant Articles
``` html
<meta charset="utf-8">
@ -354,7 +281,7 @@ Below are the link relations which are not recommended for use:
- [Facebook Instant Articles: Creating Articles](https://developers.facebook.com/docs/instant-articles/guides/articlecreate)
- [Instant Articles: Format Reference](https://developers.facebook.com/docs/instant-articles/reference)
### Twitter
### Twitter Cards
``` html
<meta name="twitter:card" content="summary">
@ -364,8 +291,6 @@ Below are the link relations which are not recommended for use:
<meta name="twitter:title" content="Content Title">
<meta name="twitter:description" content="Content description less than 200 characters">
<meta name="twitter:image" content="https://example.com/image.jpg">
<!-- More info: https://dev.twitter.com/cards/getting-started -->
<!-- Validate: https://dev.twitter.com/docs/cards/validation/validator -->
```
- [Twitter Cards: Getting Started Guide](https://dev.twitter.com/cards/getting-started)
@ -418,20 +343,13 @@ Pinterest lets you prevent people from saving things from your website, accordin
<meta name="apple-mobile-web-app-title" content="App Title">
<!-- Touch Icons -->
<link rel="apple-touch-icon" href="path/to/apple-touch-icon.png">
<link rel="apple-touch-icon-precomposed" href="path/to/apple-touch-icon-precomposed.png">
<!-- iOS 8+ no longer support precomposed, only apple-touch-icon is required -->
<!-- In most cases, one 180×180px touch icon in the head is enough -->
<!-- Utilize the different icon sizes if you would want unique icons -->
<!-- determined by device. -->
<link rel="apple-touch-icon" sizes="57x57" href="path/to/icon@57.png">
<link rel="apple-touch-icon" sizes="72x72" href="path/to/icon@72.png">
<link rel="apple-touch-icon" sizes="114x114" href="path/to/icon@114.png">
<link rel="apple-touch-icon" sizes="144x144" href="path/to/icon@144.png">
<link rel="apple-touch-icon" href="/path/to/apple-touch-icon.png">
<!-- Note: Safari on iOS 7 doesnt add effects to icons. -->
<!-- Older versions of Safari will not add effects for icon files named with the -precomposed.png suffix. -->
<!-- Startup Image ( Deprecated ) -->
<link rel="apple-touch-startup-image" href="path/to/startup.png">
<link rel="apple-touch-startup-image" href="/path/to/startup.png">
<!-- iOS app deep linking -->
<meta name="apple-itunes-app" content="app-id=APP-ID, app-argument=http/url-sample.com">
@ -444,7 +362,7 @@ Pinterest lets you prevent people from saving things from your website, accordin
```html
<!-- Pinned Site -->
<link rel="mask-icon" href="path/to/icon.svg" color="red">
<link rel="mask-icon" href="/path/to/icon.svg" color="red">
```
### Google Android
@ -481,66 +399,36 @@ Since Chrome 31, you can set up your web app to "app mode" like Safari.
<!-- Define your web page as a web app -->
<meta name="mobile-web-app-capable" content="yes">
<!-- The first one is the official recommended format. -->
<link rel="icon" sizes="192x192" href="nice-highres.png">
<link rel="icon" sizes="128x128" href="niceicon.png">
<!-- Formats with Apple prefix will be deprecated. -->
<link rel="apple-touch-icon" sizes="128x128" href="niceicon.png">
<link rel="apple-touch-icon-precomposed" sizes="128x128" href="niceicon.png">
<!-- Homescreen Icon -->
<link rel="icon" sizes="192x192" href="highres-icon.png">
```
[Google Developer](https://developer.chrome.com/multidevice/android/installtohomescreen)
- [Google Developer](https://developer.chrome.com/multidevice/android/installtohomescreen)
### Microsoft Internet Explorer
``` html
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta http-equiv="cleartype" content="on">
<meta name="skype_toolbar" content="skype_toolbar_parser_compatible">
<!-- Disable link highlighting on IE 10 on Windows Phone (https://blogs.windows.com/buildingapps/2012/11/15/adapting-your-webkit-optimized-site-for-internet-explorer-10/) -->
<!-- IE10: Disable link highlighting upon tap (https://blogs.windows.com/buildingapps/2012/11/15/adapting-your-webkit-optimized-site-for-internet-explorer-10/) -->
<meta name="msapplication-tap-highlight" content="no">
<!-- Pinned sites (https://msdn.microsoft.com/en-us/library/dn255024(v=vs.85).aspx) -->
<meta name="application-name" content="Contoso Pinned Site Caption">
<meta name="msapplication-tooltip" content="Example Tooltip Text">
<meta name="msapplication-starturl" content="/">
<meta name="application-name" content="Sample Title">
<meta name="msapplication-tooltip" content="A description of what this site does.">
<meta name="msapplication-starturl" content="http://example.com/index.html?pinned=true">
<meta name="msapplication-navbutton-color" content="#FF3300">
<meta name="msapplication-window" content="width=800;height=600">
<meta name="msapplication-task" content="name=Task 1;action-uri=http://host/Page1.html;icon-uri=http://host/icon1.ico">
<meta name="msapplication-task" content="name=Task 2;action-uri=http://microsoft.com/Page2.html;icon-uri=http://host/icon2.ico">
<meta name="msapplication-badge" value="frequency=NUMBER_IN_MINUTES;polling-uri=http://example.com/path/to/file.xml">
<meta name="msapplication-TileColor" content="#FF3300">
<meta name="msapplication-TileImage" content="/path/to/tileimage.jpg">
<meta name="msapplication-config" content="http://example.com/browserconfig.xml">
<meta name="msapplication-allowDomainApiCalls" content="true">
<meta name="msapplication-allowDomainMetaTags" content="true">
<meta name="msapplication-badge" content="frequency=30; polling-uri=http://example.com/id45453245/polling.xml">
<meta name="msapplication-navbutton-color" content="#FF3300">
<meta name="msapplication-notification" content="frequency=60;polling-uri=http://example.com/livetile">
<meta name="msapplication-square150x150logo" content="path/to/logo.png">
<meta name="msapplication-square310x310logo" content="path/to/largelogo.png">
<meta name="msapplication-square70x70logo" content="path/to/tinylogo.png">
<meta name="msapplication-wide310x150logo" content="path/to/widelogo.png">
<meta name="msapplication-task" content="name=Check Order Status;action-uri=./orderStatus.aspx?src=IE9;icon-uri=./favicon.ico">
<meta name="msapplication-notification" content="frequency=60;polling-uri=http://example.com/livetile;polling-uri2=http://example.com/livetile2">
<meta name="msapplication-task-separator" content="1">
<meta name="msapplication-TileColor" content="#FF3300">
<meta name="msapplication-TileImage" content="path/to/tileimage.jpg">
<meta name="msapplication-window" content="width=1024;height=768">
```
### Microsoft Internet Explorer: Legacy, Do Not Use!
``` html
<!-- Disable the image toolbar when you mouse over images in IE 6 (https://msdn.microsoft.com/en-us/library/ms532986(v=vs.85).aspx) -->
<meta http-equiv="imagetoolbar" content="no">
<!-- Disable Windows theming to form inputs/buttons (https://support.microsoft.com/en-us/kb/322240) -->
<meta name="MSThemeCompatible" content="no">
<!-- Disable a feature that only appeared on IE 6 beta (https://stackoverflow.com/q/2167301) -->
<meta name="MSSmartTagsPreventParsing" content="true">
<!-- Interpage Transitions (https://msdn.microsoft.com/en-us/library/ms532847(v=vs.85).aspx) -->
<meta http-equiv="Page-Enter" content="revealtrans(duration=2,transition=2)">
<meta http-equiv="Page-Exit" content="revealtrans(duration=3,transition=12)">
<meta http-equiv="Site-Enter" content="revealtrans(duration=2,transition=2)">
<meta http-equiv="Site-Exit" content="revealtrans(duration=3,transition=12)">
```
## App Links