Loading web pages on your mobile is often painfully slow, with pages taking a long time to load. Even after text are shown, pages continue to fill up over time, as ads and images start showing up. The result is an often jarring experience of janky scrolling and users needlessly losing their reading position.
AMP HTML takes advantage of CSS to let webpages look like their authors intended them to, and so allowing extensive styling is core to the platform.
Ads and analytics
But how to get from good to, let’s say, instant?
AMP documents are from the ground up designed to be efficiently pre-renderable. Browsers have long supported pre-rendering through the
<link rel=prerender>tag, but they need to be conservative about this mechanism because prerendering can be expensive. With AMP HTML we added the ability to tell a document: render yourself, but only as far as what is visible above the fold and only elements which are not CPU intensive to minimize the cost of pre-rendering. With this mechanism in place, referrers of AMP document can initiate rendering of docs before the user acts much more aggressively, so that in many cases the document will be done rendering by the time the user clicks.
AMP HTML is a specialized subset of HTML with custom elements that provides reliable performance and instant loading of static content. You can find the specification here: AMP HTML spec as well as a prototype implementation on GitHub.
Any thoughts, make your comments below.