这就是AMP
如果你是一位SEO爱好者最近应该有听说过AMP技术,什么是AMP?对网站优化加速有什么价值?无忧来给各位站长进行下讲解。
源于是一种最新的SEO技术,是Google的AMP项目。
AMP,AcceleratedMobilePages,译意大致是”加速的移动页面”,是Google去年10月份推出的一个提高移动页面访问速度的技术,你可以官方查看到相关的介绍。
点击了解详情https://www.ampproject.org/zh_cn/docs/get_started/about-amp.html或者AMP项目博客
来看看官方的视频讲解吧,需求科学上网。
通过AMP可以构建快速渲染的静态内容网页。AMP实例由三个不同部分组成:
AMPHTML
AMPJS
GoogleAMPCache
AMPHTML是为确保可靠性能而具有某些限制的HTML,它进行了一些扩展,可以构建超出基本HTML的丰富内容。AMPJS库可确保快速渲染AMPHTML页面。GoogleAMPCache(可选)提供AMPHTML页面。
AMPLandingPagesexperienceshowninaGoogleSearchflow
AMP页面加速演示
AMPHTML
AMPHTML本质上是使用自定义AMP属性扩展的HTML。最简单的AMPHTML文件如下所示:
<!doctypehtml>
<html⚡>
<head>
<metacharset="utf-8">
<linkrel="canonical"href=http://www.yunkeseo.com/wen/"hello-world.html">
<metaname="viewport"content="width=device-width,minimum-scale=1,initial-scale=1">
<styleamp-boilerplate>body{-webkit-animation:-amp-start8ssteps(1,end)0s1normalboth;-moz-animation:-amp-start8ssteps(1,end)0s1normalboth;-ms-animation:-amp-start8ssteps(1,end)0s1normalboth;animation:-amp-start8ssteps(1,end)0s1normalboth}@-webkit-keyframes-amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes-amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes-amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes-amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes-amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><styleamp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
<scriptasyncsrc=http://www.yunkeseo.com/wen/"https://cdn.ampproject.org/v0.js">
</head>
<body>HelloWorld!</body>
</html>
尽管AMPHTML页面中的大多数标记都是常规HTML标记,但部分HTML标记替换为了AMP特定标记(另请参阅
AMP规范中的HTML标记)。利用这些自定义元素(称为AMPHTML组件)可以轻松高效地实现常见的模式。
例如,amp-img标记可提供完整的srcset支持,即使在尚不支持该标记的浏览器中也是如此。
了解如何创建您的第一个AMPHTML页面。
AMPJS
AMPJS库可实现所有AMP的最佳性能做法,
管理资源加载,并为您提供上面提到的自定义标记,所有这些都是为了确保快速渲染您的页面。
重大优化之一就是使来自外部资源的所有内容保持异步,让页面中的任何内容都能毫无阻碍地渲染。
其他性能技术