• HTML <link> 标签 PC移动网站适配


    1.在pc版网页上,添加指向对应移动版网址的特殊链接rel="alternate"标记,这有助于百度发现网站的移动版网页所在的位置;

    <link rel="canonical" href="http://mobile_url" >

    2.同时在移动版网页上,添加指向对应pc版网址的链接rel="canonical"标记。

    <link rel="alternate" media="only screen and(max- 640px)" href="http://pc_url" >
    描述
    alternate 文档的替代版本(比如打印页、翻译或镜像)。
    stylesheet 文档的外部样式表。
    start 集合中的第一个文档。
    next 集合中的下一个文档。
    prev 集合中的上一个文档。
    contents 文档的目录。
    index 文档的索引。
    glossary 在文档中使用的词汇的术语表(解释)。
    copyright 包含版权信息的文档。
    chapter 文档的章。
    section 文档的节。
    subsection 文档的小节。
    appendix 文档的附录。
    help 帮助文档。
    bookmark 相关文档。
  • 相关阅读:
    vue 相对其他热门 框架 优点 --- 待续
    vue router 只需要这么几步
    正则表达式
    MySQL数据库优化的八种方式
    Django REST Framework 最佳实践
    Node.js ZLIB
    Node.js 虚拟机
    Node.js 实用工具
    Node.js URL
    Node.js UDP/Datagram
  • 原文地址:https://www.cnblogs.com/wolfone/p/12375616.html
Copyright © 2020-2023  润新知