Caching Level for ?amp=1?


I use the transitional mode from the AMP Plugin on my wordpress and the query string /?amp=1.

what would be the best cloudflare caching level for this setting?:

  1. No Query String** : Delivers resources from cache when there is no query string.
  2. Ignore Query String** : Delivers the same resource to everyone independent of the query string.
  3. Standard (Default)** : Delivers a different resource each time the query string changes.

or is it irrelevant - as AMP with ?amp=1 is not cached?


May I ask which one?

I remember there were few topics about using query ?amp and caching issues, could you try to setup and use /amp/ if the plugin offers to you?

If this AMP – WordPress plugin |, then you have the “slash” URL structure option called Paired URL Structure to select it, and therefrom you can create a Page Rule with Cache Everything option for like*/amp/ as far as dynamic HTML pages (the AMP URLs and WordPress posts) aren’t cached by default at Cloudflare (as the JS, CSS, images actually are).

Hopefully, you have got the AMP Real URL option enabled at Cloudflare dashboard:

  • Speed → Optimization → scroll down to AMP Real URL

To test AMP URLs, you would either need a device (mobile phone) with Google Chrome.
Or, using the tool below:

Moreover, using Page Rules in that case you should disable for example Rocket Loader for all of your URLs containing like /amp/ , due to some AMP validation errors which could appear.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.