SEO 优化部分

页面标题<title>标签(head 头部必须)
        <title>your title</title>
    页面关键词 keywords
        <meta name="keywords" content="your keywords">
    页面描述内容 description
        <meta name="description" content="your description">
    定义网页作者 author
        <meta name="author" content="author,email address">
    定义网页搜索引擎索引方式,robotterms 是一组使用英文逗号「,」分割的值,通常有如下几种取值:none,noindex,nofollow,all,index和follow。
        <meta name="robots" content="index,follow">

百度禁止转码

通过百度手机打开网页时,百度可能会对你的网页进行转码,往你的身上贴狗皮膏药的广告,为此可在 head 内添加

<meta http-equiv="Cache-Control" content="no-siteapp" />

link 标签

说到 link 标签,估计大家的第一反应和我一样,就是引入外部CSS样式文件的,不错,这是 link 标签最最常用的功能。不过它还有很多别的用处,比如这是浏览器 favicon 图标,touch图标等等。

<!-- 有助于防止出现内容重复的问题 -->
    <link rel="canonical" href="https://example.com/2010/06/9-things-to-do-before-entering-social-media.html">
    <!-- 之前用于包含 icon 链接,但已被废弃并不再使用 -->
    <link rel="shortlink" href="https://example.com/?p=42">
    <!-- 链接到当前文档的一个 AMP HTML 版本 -->
    <link rel="amphtml" href="https://example.com/path/to/amp-version.html">
    <!-- 表明一个 CSS 样式表 -->
    <link rel="stylesheet" href="https://example.com/styles.css">
    <!-- 链接到一个指定 Web 应用程序“安装”证书的 JSON 文件 -->
    <link rel="manifest" href="manifest.json">
    <!-- 链接到文档的作者 -->
    <link rel="author" href="humans.txt">
    <!-- 指向一个适用于链接内容的版权申明 -->
    <link rel="copyright" href="copyright.html">
    <!-- 给出可能的你的另一种语言的文档位置参考 -->
    <link rel="alternate" href="https://es.example.com/" hreflang="es">
    <!-- 提供了关于作者或其他人的信息 -->
    <link rel="me" href="https://google.com/profiles/thenextweb" type="text/html">
    <link rel="me" href="mailto:name@example.com">
    <link rel="me" href="sms:+15035550125">
    <!-- 链接到一个文档,包含当前文档的一个归档链接 -->
    <link rel="archives" href="https://example.com/2003/05/" title="May 2003">
    <!-- 链接到层次结构中的顶级资源 -->
    <link rel="index" href="https://example.com/" title="DeWitt Clinton">
    <!-- 给出该文档的起点 -->
    <link rel="start" href="https://example.com/photos/pattern_recognition_1_about/" title="Pattern Recognition 1">
    <!-- 引导当前文档的前述资源序列 -->
    <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="self" type="application/atom+xml" href="https://example.com/atomFeed.php?page=3">
    <!-- 分别是在一系列文件中的第一个、下一个、上一个和最后一个 -->
    <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="last" href="https://example.com/atomFeed.php?page=147">
    <!-- 当使用第三方服务来维护 blog 时使用 -->
    <link rel="EditURI" href="https://example.com/xmlrpc.php?rsd" type="application/rsd+xml" title="RSD">
    <!-- 当另一个 WordPress 博客链接到你的 WordPress 博客或文章时形成一个自动化的评论 -->
    <link rel="pingback" href="https://example.com/xmlrpc.php">
    <!-- 当你在自己的页面上链接到一个 url 时通知它 -->
    <link rel="webmention" href="https://example.com/webmention">
    <!-- 加载一个外部的 HTML 文件到当前 HTML 文件中 -->
    <link rel="import" href="component.html">
    <!-- 打开搜索 -->
    <link rel="search" href="/open-search.xml" type="application/opensearchdescription+xml" title="Search Title">
    <!-- Feeds -->
    <link rel="alternate" href="https://feeds.feedburner.com/example" type="application/rss+xml" title="RSS">
    <link rel="alternate" href="https://example.com/feed.atom" type="application/atom+xml" title="Atom 0.3">
    <!-- 预取,预载,预浏览 -->
    <link rel="dns-prefetch" href="//example.com/">
    <link rel="preconnect" href="https://www.example.com/">
    <link rel="prefetch" href="https://www.example.com/">
    <link rel="prerender" href="https://example.com/">
    <link rel="preload" href="image.png" as="image">
    <!-- 更多信息:https://css-tricks.com/prefetching-preloading-prebrowsing/ -->

不推荐的link标签

  <link rel="shortcut icon" href="path/to/favicon.ico">
    <!-- 没有用的, 专有的和错误的, 详见 https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/Y_2eFRh9BOs/gULYapoRBwAJ -->
    <link rel="subresource" href="styles.css">

rss订阅

<link rel="alternate" type="application/rss+xml" title="RSS" href="/rss.xml" />
 <!-- 添加 RSS 订阅 -->

favicon 图标

IE 11, Chrome, Firefox, Safari, Opera支持<link>形式设置:
<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">

注意:对于IE 10及以下版本不支持<link>形式设置,只通过将命名为favicon.ico的文件放置在网站根目录中实现。

比较详细的 favicon 介绍可参考:

												

移动前端不得不了解的HTML5 head 头标签(中下篇)的更多相关文章

  1. [转] 移动前端不得不了解的HTML5 head 头标签

    HTML的头部内容特别多,有针对SEO的头部信息,也有针对移动设备的头部信息.而且各个浏览器内核以及各个国内浏览器厂商都有些自己的标签元 素,有很多差异性.移动端的工作已经越来越成为前端工作的重要内容 ...

  2. Html5_移动前端不得不了解的html5 head 头标签

    移动前端不得不了解的html5 head 头标签   本文主要内容来自一丝的常用的 HTML 头部标签和百度FEX的HTML head 头标签. 移动端的工作已经越来越成为前端工作的重要内容,除了平常 ...

  3. 移动前端不得不了解的HTML5 head 头标签(2016最新版)

    小编推荐:掘金是一个高质量的技术社区,从 ECMAScript 6 到 Vue.js,性能优化到开源类库,让你不错过前端开发的每一个技术干货.各大应用市场搜索「掘金」即可下载APP,技术干货尽在掌握. ...

  4. 移动前端不得不了解的html5 head 头标签

    本文主要内容来自一丝的常用的 HTML 头部标签和百度FEX的HTML head 头标签. 移动端的工作已经越来越成为前端工作的重要内容,除了平常的项目开发,HTML 头部标签功能,特别是meta标签 ...

  5. 【转】移动前端不得不了解的html5 head 头标签

    来源:http://blog.csdn.net/huang100qi/article/details/42596799 本文主要内容来自一丝的常用的 HTML 头部标签和百度FEX的HTML head ...

  6. 移动前端不得不了解的HTML5 head 头标签(首篇)

    HTML的头部内容特别多,有针对SEO的头部信息,也有针对移动设备的头部信息.而且各个浏览器内核以及各个国内浏览器厂商都有些自己的标签元素,有很多差异性.移动端的工作已经越来越成为前端工作的重要内容, ...

  7. 移动前端不得不了解的HTML5 head 头标签 —— HTML基本的头部标签

    HTML的头部内容特别多,有针对SEO的头部信息,也有针对移动设备的头部信息.而且各个浏览器内核以及各个国内浏览器厂商都有些自己的标签元素,有很多差异性.移动端的工作已经越来越成为前端工作的重要内容, ...

  8. 移动前端不得不了解的HTML5 head 头标签(中上篇)

    Meta 标签 meta标签是HTML中head头部的一个辅助性标签,它位于HTML文档头部的 <head> 和 <title> 标记之间,它提供用户不可见的信息.虽然这部分信 ...

  9. 移动前端不得不了解的HTML5 head 头标签 —— Meta 标签

    Meta 标签 meta标签是HTML中head头部的一个辅助性标签,它位于HTML文档头部的 <head> 和 <title> 标记之间,它提供用户不可见的信息.虽然这部分信 ...

随机推荐

  1. rocketmq(1)

    参考: 开源社区:https://github.com/alibaba/RocketMQ rocketmq入门: http://www.cnblogs.com/LifeOnCode/p/4805953 ...

  2. Oracle 锁模式

    0:none  1:null 空  2:Row-S 行共享(RS):共享表锁  3:Row-X 行专用(RX):用于行的修改  4:Share 共享锁(S):阻止其他DML操作  5:S/Row-X ...

  3. JQUERY 轮播插件

    闲来无事,写个轮播插件,项目中用到的时候就无需在写了,不然会累死宝宝的 废话少说 代码上 html部分 <div class="lunbo"> <ul> & ...

  4. EFI Shell 命令说明

    EFI Shell 命令说明 引导命令 — EFI Shell 与 nPartition 引导有关的命令. autoboot         设置(查看)自动引导超时变量. bcfg 显示(或修改)驱 ...

  5. Android使用Apache的httpmime包post提交数据

    /** * 启动线程向服务器post提交数据 */ public void upLoadPic(final Intent data) { ToastUtils.toastWithMessage(get ...

  6. 非常不错的MySQL优化的8条经验

    1.选取最适用的字段属性   MySQL 可以很好的支持大数据量的存取,但是一般说来,数据库中的表越小,在它上面执行的查询也就会越快.因此,在创建表的时候,为了获得更好的性能,我们可以将表中字段的宽度 ...

  7. channel bonding

    一.什么是bondingLinux bonding驱动提供了一个把多个网络接口设备捆绑为单个的网络接口设置来使用,用于网络负载均衡及网络冗余二.bonding应用方向1.网络负载均衡对于bonding ...

  8. tensorflow安装相关的

    1 Install pip and Virtualenv sudo apt-get install python-pip python-dev python-virtualenv2 Create a ...

  9. PHP来实现文件上传

    文件php <?phpif ($_FILES["file"]["error"] > 0){ echo '错误: ' . $_FILES[" ...

  10. ZZNU 1993: cots' friends

    题目描述 cot 最近非常喜欢数字, 喜欢到了什么程度呢, 已经走火入魔了.... cot把每个朋友编上一个序号,然后遇到谁就叫"XX号",对此,他的朋友们一致认为cot" ...