Real URLs for AMP Cached Content Using Cloudflare Workers

One of the complaints aimed towards the implementation of AMP is that you had your content served from Google on their own URLs. Cloudflare have developed a way in which you will still gain benefit from being on the Google AMP caching servers, but you’ll retain your own domain when the content is served. I’m going to be honest, I got lost about 5 minutes into this article but it seems to be a good thing if that was your only reservation on AMP. It’s still in alpha, but they’re after testers if you’re interested

The inability to use original content URLs with AMP posed some serious issues. First, the URL prefix can strip URLs of their meaning. To the frustration of publishers, their content is no longer directly attributed to them by a URL (let alone a certificate). The publisher can no longer prove the integrity and authenticity of content served on their behalf.

Second, for web browsers the lack of a publisher’s URL can call the integrity and authenticity of a cached webpage into question. Namely, there’s no clear way to prove that this response is a cached version of an actual page published by 1-800-Flowers. Additionally, cookies are managed by third-party providers like Google instead of the publisher.

Enter Web Packaging, a collection of specifications for “packaging” website content with information like certificates and their validity. The HTTP signed exchanges specification allows third-party caches to cache and service HTTPS requests with proof of integrity and authenticity.

An excerpt from Real URLs for AMP Cached Content Using Cloudflare Workers

View original article

Subscribe to our Newsletter

Add your email address and receive an email every Friday covering off everything worth knowing about building your websites responsively.