1

We're interested in using AMP for the load time optimizations, but there's some concern about depending on external CDNs and having our page cached by organizations outside of our control (ie, Google). Is it possible to create a page using the AMP toolkit that takes advantage of the performance optimizations, but allows us to retain control of the CDNs and cacheing strategies?

Doesn't matter to us if it actually validates as AMP or not, so long as it's fast and under our control.

Thanks.

Michael
  • 145
  • 6
  • Well, based on the [AMP documentation](https://www.ampproject.org/learn/about-amp/), AMP consists of three different parts AMP HTML, AMP JS and the Google AMP Cache. This Google AMP Cache is the CDN for the AMP that deliversall valid AMP documents. It fetches AMP HTML pages, caches them, and improves page performance automatically. So this CDN is the default for the AMP pages. But from this [SO question](http://stackoverflow.com/questions/34802576), they try to use Cloudfare as a CDN. But take note that if you do this, the Google CDN will not be involve anymore. – KENdi Dec 07 '16 at 09:11
  • Yeah, it sounds theoretically possible if you don't include certain tags that will allow Google to detect and cache the page as AMP. I'm wondering if anyone has actually done this and can report on the efficacy. – Michael Dec 07 '16 at 15:24
  • Do you want to use AMP as the canonical or mobile version of your website? – Sebastian Benz Dec 07 '16 at 19:40
  • Right now, we're thinking about using AMP only as a landing page for mobile. – Michael Dec 08 '16 at 15:37

1 Answers1

0

It depends on your requirements. Valid AMP pages require serving the AMP script from Google's servers.

From the documentation:

AMP HTML documents MUST:
(...)
Contain a <script async src="https://cdn.ampproject.org/v0.js"></script> tag 
as the second child of their <head> tag (this includes and loads the AMP JS 
library).

As far as I've seen, embedding the AMP script(s) locally or from another CDN will render your pages correctly - but it's not valid AMP anymore. You could use AMP as a mobile toolkit, ideally by forking the AMP project and editing the validator to make it work properly. Of course, Google would not evaluate the resulting pages as AMP, deny any privileges in the search engine, and not include you into the AMP cache.

In other words: If you want to use AMP, Google demands that you'll tell them about every single call to every single AMP page and depend on their CDN.

wortwart
  • 3,139
  • 27
  • 31