python html5 bootstrap 视频教程

德云社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 8738|回复: 0

2015百度站长平台移动sitemap协议mobile type:mobile pc,mobile htmladapt

[复制链接]

172

主题

258

帖子

1114

积分

版主

Rank: 7Rank: 7Rank: 7

金钱
663
金币
7
威望
0
贡献
0
发表于 2015-6-11 15:09:50 | 显示全部楼层 |阅读模式
AI人工智能 语音助理 人工翻译 教程
2015百度站长平台移动sitemap协议mobile type:mobile pc,mobile htmladapt

2015年6月百度站长平台就“PC站点移动化”问题发布公告。据公告显示,百度方面已将PC移动化方式规范化,目前主要分为三种方式:跳转适配、代码适配和自适应。且升级了移动sitemap中的mobile type标注。


百度站长平台对移动sitemap协议里的mobile type标注进行更新升级,修改了对自适应页面的标注方式,增加了对代码适配页面的标注方式。现在移动sitemap协议mobile type标注如下:


1433814486668.png

现阶段新旧方式会并行一段时间,希望大家尽快使用新的mobile type标注提交数据,以便更好地与百度进行数据合作。


智能编辑重构 批处理式 "数字 Python IDE" 集成开发环境 (集成高效 Cython PyInstaller 批处理小程序)

http://dt.digitser.cn/zh-CN/ide/idepy/index.html


跳转适配、代码适配和自适应

01、跳转适配

该方法采用单独网址,向每种设备提供不同网页代码;即,PC端一个网站,移动端一个网站。


当通过PC或移动设备浏览网页时,会在两个网站间自动跳转;主要用于PC端采用HTML4标准制作的旧网站,及部分有特殊要求的HTML5标准网站。


这种配置会尝试检测用户所使用的设备或ua,然后使用HTTP重定向和Vary HTTP标头重定向到相应的页面。

02、代码适配

该方法采用相同网址(不考虑用户所使用的设备),但会根据服务器对用户所用浏览器的了解(ua),针对不同设备类型生成不同版本的HTML。


类似Discuz 3.2提供的PC端网站和移动端网站。


03、自适应

通过同一网址提供相同HTML代码的网站设计方法。


该方法不考虑用户所使用的设备(pc、平板电脑、移动设备),但可以根据屏幕尺寸以不同方式呈现(即适应)显示屏。


主要用于PC端采用HTML5标准制作的新网站。


sitemap范例

百度推出的移动Sitemap协议,用于将网址提交给移动搜索收录。


百度移动Sitemap协议是在标准Sitemap协议基础上制定的,增加了<mobile:mobile/>标签,有4种取值,没有这些标签为纯PC网页

01、<mobile:mobile/>

移动网页


02、<mobile:mobile type="mobile"/>

移动网页


03、<mobile:mobile type="pc,mobile"/>

自适应网页,主要用于PC端采用HTML5标准制作的新网站。


04、<mobile:mobile type="htmladapt"/>

代码适配

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!-- XML文件需采用utf-8编码 -->
  3. <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:mobile="http://www.baidu.com/schemas/sitemap-mobile/1/">
  4.     <url>
  5.         <loc>http://m.digitser.net/index.html</loc>
  6.         <mobile:mobile type="mobile"/>
  7.         <!-- 向百度移动搜索提交了一个移动网页 -->
  8.         <lastmod>2015-06-11</lastmod>
  9.         <changefreq>daily</changefreq>
  10.         <priority>0.8</priority>
  11.     </url>
  12.     <url>
  13.         <loc>http://www.digitser.net/index.html</loc>
  14.         <!-- 向PC搜索提交一个传统网页 -->
  15.         <lastmod>2015-06-11</lastmod>
  16.         <changefreq>daily</changefreq>
  17.         <priority>0.8</priority>
  18.     </url>
  19.     <url>
  20.         <loc>http://www.digitser.com/autoadapt.html</loc>
  21.         <mobile:mobile type="pc,mobile"/>
  22.         <!-- 同时向移动搜索和PC搜索提交了一个自适应网页 -->
  23.         <lastmod>2015-06-11</lastmod>
  24.         <changefreq>daily</changefreq>
  25.         <priority>0.8</priority>
  26.     </url>
  27.     <url>
  28.         <loc>http://www.example.com/htmladapt.html</loc>
  29.         <mobile:mobile type="htmladapt"/>
  30.         <!-- 向移动搜索提交一个代码适配网页 -->
  31.         <lastmod>2015-06-11</lastmod>
  32.         <changefreq>daily</changefreq>
  33.         <priority>0.8</priority>
  34.     </url>
  35. </urlset>
复制代码

注意:移动Sitemap协议做好后,与提交普通Sitemap方式一致。

扫一扫关注 德云社区 微信公众号

版权声明:
本文为独家原创稿件,版权归 德云社区,未经许可不得转载。
AI人工智能 语音助理 人工翻译 教程
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|Sitemap|小黑屋|德云社区 |网站地图  

GMT+8, 2024-3-29 09:59 , Processed in 0.030025 second(s), 30 queries .

工业和信息化部: 粤ICP备14079481号-2

技术支持 乐数软件     版权所有 © 2014-2021 德云社区    

快速回复 返回顶部 返回列表