Support » Plugin: W3 Total Cache » Disable on AMP pages

  • Resolved missyklotz

    (@missyklotz)


    How do I disable W3TC on AMP pages? AMP support thread sent me over here. They said W3TC is truncating my pages. This is what I get when I view source on an AMP page currently.

    <!doctype html>
    <html amp>
    <head>
    	<meta charset="utf-8">
    	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    	    <script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
    
    <!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/
    
    Content Delivery Network via Amazon Web Services: CloudFront
    
     Served from: www.[MY DOMAIN NAME].com @ 2016-03-30 17:52:40 by W3 Total Cache -->

    https://wordpress.org/plugins/w3-total-cache/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Ramanan

    (@superpoincare)

    Under Page Cache,

    Under Never cache the following pages:

    Add this:

    /.*amp.*

    Then go to your backed and delete the cache folder.

    I did that and now we’ve got this. Any ideas?

    <!doctype html>
    <html amp>
    <head>
    	<meta charset="utf-8">
    	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    	    <script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
    
    <!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/
    
    Minified using disk (Request URI is rejected)
    Page Caching using disk: enhanced (Requested URI is rejected)
    Database Caching using disk (Request-wide Request URI is rejected)
    Object Caching 795/799 objects using disk
    Content Delivery Network via Amazon Web Services: CloudFront: 
    
     Served from: www.[MY DOMAIN NAME].com @ 2016-04-05 10:34:18 by W3 Total Cache -->

    I’ve disabled W3 Total Cache and am still having the same problem. Thinking this isn’t a total cache problem so I’m closing this thread.

    Rajesh Vasani

    (@vasanirajesh11)

    /.*amp.*
    this regexp will also disable page caching on page where URL path contain amp
    eg:
    xyz.com/amptest/
    xyz.com/testamptest/
    xyz.com/testamp/

    We just need to disable page caching only for AMP page not normal post page.
    I suggest you to use this regexp.

    .*/amp/

    this will disable page cache only on AMP page.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Disable on AMP pages’ is closed to new replies.