liangsheng 发表于 2015-6-11 15:09:50

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

2015百度站长平台移动sitemap协议mobile type:mobile pc,mobile htmladapt
2015年6月百度站长平台就“PC站点移动化”问题发布公告。据公告显示,百度方面已将PC移动化方式规范化,目前主要分为三种方式:跳转适配、代码适配和自适应。且升级了移动sitemap中的mobile type标注。
百度站长平台对移动sitemap协议里的mobile type标注进行更新升级,修改了对自适应页面的标注方式,增加了对代码适配页面的标注方式。现在移动sitemap协议mobile type标注如下:

现阶段新旧方式会并行一段时间,希望大家尽快使用新的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"/>代码适配
<?xml version="1.0" encoding="UTF-8" ?>
<!-- XML文件需采用utf-8编码 -->
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:mobile="http://www.baidu.com/schemas/sitemap-mobile/1/">
    <url>
      <loc>http://m.digitser.net/index.html</loc>
      <mobile:mobile type="mobile"/>
      <!-- 向百度移动搜索提交了一个移动网页 -->
      <lastmod>2015-06-11</lastmod>
      <changefreq>daily</changefreq>
      <priority>0.8</priority>
    </url>
    <url>
      <loc>http://www.digitser.net/index.html</loc>
      <!-- 向PC搜索提交一个传统网页 -->
      <lastmod>2015-06-11</lastmod>
      <changefreq>daily</changefreq>
      <priority>0.8</priority>
    </url>
    <url>
      <loc>http://www.digitser.com/autoadapt.html</loc>
      <mobile:mobile type="pc,mobile"/>
      <!-- 同时向移动搜索和PC搜索提交了一个自适应网页 -->
      <lastmod>2015-06-11</lastmod>
      <changefreq>daily</changefreq>
      <priority>0.8</priority>
    </url>
    <url>
      <loc>http://www.example.com/htmladapt.html</loc>
      <mobile:mobile type="htmladapt"/>
      <!-- 向移动搜索提交一个代码适配网页 -->
      <lastmod>2015-06-11</lastmod>
      <changefreq>daily</changefreq>
      <priority>0.8</priority>
    </url>
</urlset>注意:移动Sitemap协议做好后,与提交普通Sitemap方式一致。

http://forum.digitser.cn/data/attachment/forum/201605/19/132155fevczeyds5e5y1wy.jpg扫一扫关注 德云社区 微信公众号
版权声明:
本文为独家原创稿件,版权归 德云社区,未经许可不得转载。
页: [1]
查看完整版本: 2015百度站长平台移动sitemap协议mobile type:mobile pc,mobile htmladapt