Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Accelerated Mobile Pages: The good, the bad and the ugly

Vitor Talaia
September 21, 2018

Accelerated Mobile Pages: The good, the bad and the ugly

The purpose of this talk is to introduce the Accelerated Mobile Pages (AMP) project, a way to make web pages load insanely fast on mobile devices. How it works, its benefits -and why it’s a hot topic for media publishers-, its downsides -and why developers are criticizing it.

Vitor Talaia

September 21, 2018
Tweet

More Decks by Vitor Talaia

Other Decks in Programming

Transcript

  1. 19s to load 53% of users will abandon the page

    after 3s https://www.thinkwithgoogle.com/intl/en-154/insights-inspiration/research-data/need-mobile-speed- how-mobile-latency-impacts-publisher-revenue/
  2. AMP HTML Spec HTML that includes custom AMP features through

    web components. AMP JS Library A script to implement AMP’s performance best practices and provide the custom elements from the AMP HTML Spec. AMP Cache Servers that deliver AMP content. They fetch the AMP pages, cache, optimize and validate them.
  3. <!doctype html> <html amp lang="en"> <head> <meta charset="utf-8"> <script async

    src="https://cdn.ampproject.org/v0.js"></script> <link rel="canonical" href="https://news.com/sports/brazil-7-1-germany-wc-final"> <title>...</title> <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> <style amp-boilerplate>...</style> <noscript> <style amp-boilerplate>...</style> </noscript> <style amp-custom>...</style> </head> <body>...</body> </html>
  4. <amp-img> src="brazil-2018-world-cup-champions.jpg" width="800" height="600" alt="Brazilian squad celebrating the 2018 WC

    title" > <noscript> <img src="brazil-2018-world-cup-champions.jpg" width="800" height="600" alt="Brazilian squad celebrating the 2018 WC title" /> </noscript> </amp-img>
  5. In the non-AMP version In the AMP version <link rel="canonical"

    href="https://news.com/sports/brazil-7-1-germany-wc-final"> <link rel="amphtml" href="https://news.com/sports/brazil-7-1-germany-wc-final/amp">
  6. Add more functionality as you need it <head> <script async

    custom-element="amp-audio" src="https://cdn.ampproject.org/../amp-audio.js"></script> <script async custom-element="amp-carousel" src="https://cdn.ampproject.org/../amp-carousel.js"></script> </head> <body> <amp-audio>...</amp-audio> <amp-carousel>...</amp-carousel> </body>
  7. “ It’s not so much about what AMP does; it’s

    more about what it doesn’t allow. Jeremy Keith https://medium.com/clear-left-thinking/in-amp-we-trust-527b0bb309e1
  8. AMP is the only way to appear on the carousel

    and receive the lightning bolt sign
  9. “ Let’s incentivize the goal, not the tool. Tim Kadlec

    https://timkadlec.com/remembers/2018-02-14-the-two-faces-of-amp/