Support » Plugin: Cloudflare » Issue with AMP Plugin

  • Tim

    (@tjalexander70)


    I recently started using the AMP plugin and immediately noticed that I was not getting the full benefits of Automatic Platform Optimization.

    While AMP pages were ultimately loading faster overall, “Time to First Byte” and “First Paint” were coming in double that of Non-AMP. So, not as fast as they should have been.

    A presume the issue is that the AMP plugin uses ‘/?amp’ rather than ‘/amp/’ to identify pages.

    My current workaround has been to set up a Cache Everything page rule for AMP pages. However, that does not seem like the best solution.

    Is there another option?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Using Cache Everything for AMP pages is the best option at the moment. Supporting caching of AMP pages with APO requires separate cache, it’s not feasible currently. Hopefully it will be much easier next year when Cloudflare Cache will add proper support of Vary header.

    • This reply was modified 1 year, 5 months ago by yevgens.
    Thread Starter Tim

    (@tjalexander70)

    Thanks for letting me know.

    How to configure Cache Everything page rule for AMP pages?

    Thread Starter Tim

    (@tjalexander70)

    The way I have it set up is:

    https://example.com/a/*/?amp*
    Browser Cache TTL: an hour, Always Online: On, Cache Level: Cache Everything, Edge Cache TTL: an hour

    That seems to work fine.

    Hi, I think I got it, thank you. But my website has categories and in some cases subcategories (more than 300).

    Example:

    example.com/a/my-entry.htm
    example.com/a/b/my-second-entry.htm

    This url could be used for the entire web project (categories and subcategories)?:
    example.com/*/?amp*

    Thanks

    Thread Starter Tim

    (@tjalexander70)

    I wanted to update this thread for those looking for a solution. The AMP plugin is working on allowing websites the option it use /amp/ in the path rather than a string.

    See: https://wordpress.org/support/topic/amp-and-cloudflare/

    I have been testing it on my website, and it seems to have solved the issue with AMP and Cloudflare cache.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Issue with AMP Plugin’ is closed to new replies.