Why AMP Caches exist

If you’d rather watch than read, here’s the video version!
  • Ensure that all AMP pages are actually valid AMP.
  • Allow AMP pages to be preloaded efficiently and safely.
  • Do a myriad of additional user-beneficial performance optimizations to content.

The Basics: Analytics attribution and link sharing

When the label says AMP, you get AMP

Pre-rendering is a bigger deal than you think

Perceived as much faster

Visualization of a pre-render

Very efficient compared to full pre-rendering

Safe to embed

  • Validator ensures no Cross-Site Scripting (XSS) in main document.
  • On top of the validator, the AMP Cache parses and then re-serializes the document in an unambiguous fashion (this means that it does not rely on HTML5 error correction). This ensures that browser parsing bugs and differences cannot lead to XSS.
  • The cache applies a Content Security Policy (CSP). This provides additional defense-in-depth against XSS attacks.

Additional privacy

Auto-optimizations that often result in dramatic speed increase

  • Consistent, fast and free content delivery network for all content (not just big publishers).
  • Optimizes HTML through measures such as bringing scripts into the ideal order, removing duplicate script tags and removing unnecessary quotes and whitespace.
  • Rewrites JavaScript URLs to have infinite cache time.
  • Optimizes images (a 40% average bandwidth improvement!)

Isn’t there a better way of doing this?

From cache to web standards?

--

--

--

Open Web Developer Advocate at Google • Tools, Performance, Animation, UX • HFR enthusiast • Creator of jQuery UI and the first HTML5 game engine (Aves Engine)

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Paul Bakaus

Paul Bakaus

Open Web Developer Advocate at Google • Tools, Performance, Animation, UX • HFR enthusiast • Creator of jQuery UI and the first HTML5 game engine (Aves Engine)

More from Medium

SOLID Principles

Git part1

OTT broadcasting: basic parameters and setup tips

BEST SOFTWARE DEVELOPMENT