简体   繁体   English

W3C验证不适用于AMP页面,是什么原因?

[英]W3C validation does not apply for AMP pages, any reason?

None of AMP page would be pass by W3C validation, why so? W3C验证不会通过任何AMP页面,为什么呢? As we know that W3C is standard community to validate any page on internet as its developed by taking care HTML code. 众所周知,W3C是标准社区,可以通过注意HTML代码来验证Internet上开发的任何页面。 But when we checked any AMP page and try to pass it from W3C validation then we always get failed response. 但是,当我们检查任何AMP页面并尝试通过W3C验证传递它时,我们总是会收到失败的响应。

Google didn't design AMP to conform to the HTML standard, and either: Google并未将AMP设计为符合HTML标准,并且:

  • Nobody has written a patch to the Validation Service / Nu Validator to add AMP support or 没有人为Validation Service / Nu Validator编写补丁来添加AMP支持
  • Somebody has, but there's no desire to merge it 有人拥有,但不希望将其合并

Although the W3C is the official organization for maintaining the standards for HTML (currently HTML 5), it doesn't mean that the browsers support only for the W3C recommended valid HTML codes. 尽管W3C是维护HTML(目前为HTML 5)标准的官方组织,但这并不意味着浏览器仅支持W3C建议的有效HTML代码。 Google introduces its latest technology as AMP (Accelerated Mobile Pages) to ensure the ease of loading the web pages on the mobile screens. Google引入了其最新技术AMP(加速移动页面),以确保轻松在移动屏幕上加载网页。 Google has changed its searching algorithm that is applicable on the requests/ queries sent through the mobile devices. Google更改了其搜索算法,该算法适用于通过移动设备发送的请求/查询。 As a further explanation, it is true and 100% acceptable that every web page is not suitable to load on a mobile screen as it has some sort of specific limitations such as the screen sizes, pixel density and memory capacities of mobile phones. 作为进一步的解释,每个网页都不适合在移动屏幕上加载,因为它具有某种特定的限制,例如屏幕尺寸,像素密度和移动电话的存储容量,这是正确且100%可以接受的。

Therefore, Google gives the priority for the pages which are specifically designed to reach the visitors who prefer to visit the websites from their mobile devices. 因此,Google优先考虑专门设计的页面,以覆盖希望通过移动设备访问网站的访问者。

In the past, companies (specially Microsoft) which develop web browsers (Internet Explorer), continued the development of their products (browsers) according to their own standards until all of them come to a common general set of standards published by the W3C. 过去,开发Web浏览器(Internet Explorer)的公司(特别是Microsoft)一直根据自己的标准继续开发其产品(浏览器),直到它们全部达到W3C发布的通用通用标准集为止。 Likewise, at present AMP is expected by Google in their ranking algorithms. 同样,目前Google期望AMP在其排名算法中使用。 But later it will be absorbed by other search engines too. 但是后来它也会被其他搜索引擎吸收。

As a best practice, for now, I recommend to fully convert all the general web pages that targets Mobile visitors (accessing the WWW via mobile devices) to AMP. 作为最佳实践,现在,我建议将所有针对移动访问者(通过移动设备访问WWW)的常规网页完全转换为AMP。 Specially the mobile websites which typically starts their web address from "m." 特别是通常从“ m”开始其网址的移动网站。 like https://m.example.com https://m.example.com

If the AMP project gets success, W3C will update its validation rules to allow the AMP tags and codes as well. 如果AMP项目成功,W3C将更新其验证规则,以允许AMP标签和代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM