• Resolved rickstar123

    (@rickstar123)


    I have installed Super Page Cache for Cloudflare and enabled Page Caching, then tested the cache and received this message:

    Page caching seems not working for both dynamic and static pages.

    Error on dynamic page (https://www.kidsbookexplorer.com): Seem that your website is not behind Cloudflare. If you have recently enabled the cache or it is your first test, wait about 30 seconds and try again because the changes take a few seconds for Cloudflare to propagate them on the web. If the error persists, request support for a detailed check.

    Error on static resource (https://www.kidsbookexplorer.com/wp-content/modules/wp-cloudflare-page-cache/assets/testcache.html): Seem that your website is not behind Cloudflare. If you have recently enabled the cache or it is your first test, wait about 30 seconds and try again because the changes take a few seconds for Cloudflare to propagate them on the web. If the error persists, request support for a detailed check.

    Please check if the page caching is working by yourself by surfing the website in incognito mode ’cause sometimes Cloudflare bypass the cache for cURL requests. Reload a page two or three times. If you see the response header?cf-cache-status: HIT, the page caching is working well.

    When I interrogate my Response Headers, I get this report:

    cf-cache-status: MISS
    cf-ray: 7b98be74ed6adf9d-MEL
    content-encoding: br
    content-type: text/html; charset=UTF-8
    date: Tue, 18 Apr 2023 00:20:47 GMT
    host-header: 8441280b0c35cbc1147f8ba998a563a7
    last-modified: Tue, 18 Apr 2023 00:20:47 GMT
    link: https://www.kidsbookexplorer.com/wp-json/; rel=”https://api.w.org/”
    nel: {“success_fraction”:0,”report_to”:”cf-nel”,”max_age”:604800}
    report-to: {“endpoints”:[{“url”:”https:\/\/a.nel.cloudflare.com\/report\/v3?s=ZzAmV%2FCErQZmp7dmF6ltjCBYEbZp%2BHb7iJFdwmdj1%2FdWlivHdF7%2B9IU%2BOaew%2BgHLgSb6JTVx6yKmw1sX8X397tw5OpaVFAO1oYC7h7a6Gq9N%2BCtqGrv0SN2ym1AbukghiKmNsj1SGbUUDtg%3D”}],”group”:”cf-nel”,”max_age”:604800}
    server: cloudflare
    vary: Accept-Encoding
    x-cache-enabled: True
    x-httpd-modphp: 1
    x-proxy-cache: HIT
    x-wp-cf-super-cache: disabled
    x-wp-cf-super-cache-cach

    Can you please assist as to why I am receiving this error message. Thank you.

Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    Hi @rickstar123,
    I just looked at your website’s response header and looking at it, I do not see any response header related to Cloudflare cache. Have you disabled the Orange cloud inside your Cloudflare DNS for your domain? Screenshot: https://i.imgur.com/vBQNErI.jpeg

    Thread Starter rickstar123

    (@rickstar123)

    Hi Saumya, Thank you for your reply. I’m sorry I don’t know what I’m supposed to be disabling inside the my Cloudflare DNS. Do you mean disabling the proxy status for kidsbookexplorer.com?

    Thread Starter rickstar123

    (@rickstar123)

    I can confirm that the orange cloud is enabled for kisbookexplorer.com in the DNS records.

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @rickstar123,
    Can you share a screenshot of your Cloudflare DNS page?

    Thread Starter rickstar123

    (@rickstar123)

    Here’s the screenshot you requested.

    https://www.dropbox.com/t/6aJeI1b5Wuxxu2WS

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @rickstar123,
    Have you recently changed your nameserver? Cause according to my system the nameserver of your domain points to siteground and not Cloudfalre. So, if you have made the change recently maybe it hasn’t been propagated yet as nameserver change sometimes take 24-48 hours to propagate.

    Thread Starter rickstar123

    (@rickstar123)

    I changed DNS yesterday. According to this DNS lookup, it appears that Cloudflare is the owner.

    A Records :
    
    [0] Name : kidsbookexplorer.com | ttl: 300 | ip: 104.21.3.111
    
    [1] Name : kidsbookexplorer.com | ttl: 300 | ip: 172.67.130.151
    
    ------------------
    
    AAAA Records :
    
    [0] Name : kidsbookexplorer.com | ttl: 300 | ip: 2606:4700:3033::6815:36f
    
    [1] Name : kidsbookexplorer.com | ttl: 300 | ip: 2606:4700:3031::ac43:8297
    
    ------------------
    
    CNAME Records: None
    
    ------------------
    
    MX Records :
    
    [0] Name : kidsbookexplorer.com | ttl: 300 | ip: 34.149.79.66 | mx: mx10.antispam.mailspamprotection.com. | preference: 10
    
    [1] Name : kidsbookexplorer.com | ttl: 300 | ip: 34.120.156.61 | mx: mx20.antispam.mailspamprotection.com. | preference: 20
    
    [2] Name : kidsbookexplorer.com | ttl: 300 | ip: 34.111.121.216 | mx: mx30.antispam.mailspamprotection.com. | preference: 30
    
    ------------------
    
    NS Records :
    
    [0] Name : kidsbookexplorer.com | ttl: 21600 | value: arely.ns.cloudflare.com.
    
    [1] Name : kidsbookexplorer.com | ttl: 21600 | value: duke.ns.cloudflare.com.
    
    ------------------
    
    PTR Records: None
    
    ------------------
    
    SRV Records: None
    
    ------------------
    
    SOA Records :
    
    [0] Name : kidsbookexplorer.com | ttl: 3600 | mname: arely.ns.cloudflare.com. | rname: dns.cloudflare.com.
    
    ------------------
    
    TXT Records :
    
    [0] Name : kidsbookexplorer.com | ttl: "300" | value: "google-site-verification=5IYYP4YLYRQyoAqrAenb1994subOPN1FC62Lht0afAY"
    
    [1] Name : kidsbookexplorer.com | ttl: "300" | value: "google-site-verification=gFCSoGiOsJf9NPXnt4ON11O_v-rXU7ID5V7tD9ow6y8"
    
    [2] Name : kidsbookexplorer.com | ttl: "300" | value: "v=spf1 +a +mx +ip4:35.213.213.220 include:_spf.mailspamprotection.com ~all"
    
    ------------------
    
    CAA Records: None
    
    ------------------
    
    DS Records: None
    
    ------------------
    
    DNSKEY Records: None
    
    ------------------
    Plugin Contributor iSaumya

    (@isaumya)

    Yes, but that change hasn’t been reflected here. As I said the nameserver change propagation takes some time. Take a look: https://i.imgur.com/MAKIaOQ.jpeg

    Thread Starter rickstar123

    (@rickstar123)

    Thanks Saumya, I understand. I’ll check again tomorrow then. Also, I’ve disabled the Siteground Server Side Caching I had previously. Should I also disable the SG Optimizer Dynamic Caching, File-Based Caching and Memcached?

    Thread Starter rickstar123

    (@rickstar123)

    Hi Saumya,

    I retested the cache in your plugin today and am pleased to report that it returned “Page caching is working properly.” I also conducted speed tests with GTmetrix and am very happy with the results. However, I noticed a medium impact warning related to “Serve static assets with an efficient cache policy” (screenshot: https://www.dropbox.com/t/KiGTC9cBMJ2h8oWE). The Cache TTL appears to be set to “none.” Is this something I need to adjust in the Super Page Cache settings?

    Additionally, my Header Response displays the following line: “x-wp-cf-super-cache-cookies-bypass: swfpc-feature-not-enabled.” Is this a feature I should enable?

    I’m not particularly knowledgeable about caching, so I’m wondering if there’s a “best practices” tutorial for your plugin to help me optimize the settings.

    I’m currently using Perfmatters, and Brian Jackson has been helpful in setting it up. In fact, it was he who recommended trying your plugin. I would greatly appreciate your input if you have any suggestions regarding potential conflicts with Siteground’s SG Optimizer or any other tips to improve my settings within your plugin.

    Thank you for your assistance.

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @rickstar123,
    Sorry for the delayed response. To resolve “Serve static assets with an efficient cache policy” issues, you should enable the Add browser caching rules for static assets option inside Plugin Settings > Cache Tab > Scroll down to the end. This will add the proper cache-control for all the static files hosted by your website. After implementing this, please make sure to “force purge everything” from the plugin settings page.

    Additionally, my Header Response displays the following line: “x-wp-cf-super-cache-cookies-bypass: swfpc-feature-not-enabled.” Is this a feature I should enable?

    — Don’t worry. It is supposed to be that that. You do not need to enable that feature. As it is a legacy feature.

    I’m currently using Perfmatters, and Brian Jackson has been helpful in setting it up. In fact, it was he who recommended trying your plugin. I would greatly appreciate your input if you have any suggestions regarding potential conflicts with Siteground’s SG Optimizer or any other tips to improve my settings within your plugin.

    — Perfmatter is a terrific plugin for optimizations (outside of page cache) and I will highly recommend you using it. In terms of SG Optimizer, I mean you can use it for static file optimization like image optimization but do not use it for any page caching operation. Beside if you are considering using it just for image optimization, then there are many other alternative solution available like Imagekit.io, shortpixel, Cloudflare Pro (Polish) etc. So, unless you need the SG optimizer don’t use it.

    In terms of best settings, the default settings of the plugin is generally best and that’s why it’s out of the box. But you can do the following things as well to take it up a notch:

    • Enable “Smart Tiered Cache” inside your Cloudflare Dashboard
    • Inside plugin settings > other tab > check the implementation guide for the Remove Cache Buster Query Parameter option. Add all the cache rules mentioned there and then enable the option.
    • If your website is not an eCommerce website, then you can also enable the Auto prefetch URLs in viewport and Auto prefetch URLs on mouse hover inside the plugin settings > other tab. But if you are going to use this option, then please make sure you have disabled the instant.page implementation inside Perfmatter. Screenshot: https://i.imgur.com/Ml22tM2.jpeg
    Thread Starter rickstar123

    (@rickstar123)

    Hi Saumya,

    I’m sorry of the slow response, but was holidaying overseas from the day after your reply till now.

    I implemented all of the above recommendations except for enabling “Smart Tiered Cache” in Cloudflare as I’d prefer to not pay the additional $5 monthly charge.

    I also tweaked my Cloudflare settings according to Brian Jacksons recommendations: https://perfmatters.io/docs/cloudflare-wordpress-settings/

    However, I had an issue with content not updating on my site which I seem to have pin-pointed to the Browser Cache TTL setting I changed in Cloudflare when I changed that setting from “respect existing headers” to “1 month”. I have since changed back to “respect existing headers” and the content is updating fine.

    However, in the process of trouble shooting this issue, I disabled SPC and paused Cloudflare. Both are now active again, but when I test cache in SPC I get the following error:

    Page caching seems not working for both dynamic and static pages.

    Error on dynamic page (https://www.kidsbookexplorer.com): Cache status: BYPASS – Cloudflare has been instructed to not cache this asset. It has been served directly from the origin.

    Error on static resource (https://www.kidsbookexplorer.com/wp-content/modules/wp-cloudflare-page-cache/assets/testcache.html): Cache status: BYPASS – Cloudflare has been instructed to not cache this asset. It has been served directly from the origin.

    Please check if the page caching is working by yourself by surfing the website in incognito mode ’cause sometimes Cloudflare bypass the cache for cURL requests. Reload a page two or three times. If you see the response header?cf-cache-status: HIT, the page caching is working well

    Do you have any idea why this might be?.

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @rickstar123,

    I implemented all of the above recommendations except for enabling “Smart Tiered Cache” in Cloudflare as I’d prefer to not pay the additional $5 monthly charge.

    Smart Tiered Cache is 100% free of charge. Cache Reserve is a paid feature but Smart Tiered Cache is FREE. Screenshot: https://i.imgur.com/5c9NfTW.jpeg

    I also tweaked my Cloudflare settings according to Brian Jacksons recommendations: https://perfmatters.io/docs/cloudflare-wordpress-settings/

    When using this plugin changing those Cloudflare settings without understanding what your are doing wilol cause many issues. That article is about using cloudflare without using this plugin when you are using this plugin, you should not implement all the changes mentioned there without understanding it’s outcome.

    However, I had an issue with content not updating on my site which I seem to have pin-pointed to the Browser Cache TTL setting I changed in Cloudflare when I changed that setting from “respect existing headers” to “1 month”. I have since changed back to “respect existing headers” and the content is updating fine.

    When using this plugin the “Browser Cache TTL” should always be set to “Respect Header”.

    Error on dynamic page (https://www.kidsbookexplorer.com): Cache status: BYPASS – Cloudflare has been instructed to not cache this asset. It has been served directly from the origin.

    This is happening because either you haev some other page caching plugin present in your website which is modifying the cache-control response header or it is being replaced by some server level rule. When the plugin is working properly the value of cache-control and x-wp-cf-super-cache-cache-control should match, which is not happening in case of your website clearly stating that some other caching system is at play here. Screenshot: https://i.imgur.com/1QTpTpz.jpeg

    Thread Starter rickstar123

    (@rickstar123)

    Hi Saumya,

    Thank you for your reply.

    I’m at a loss to understand why that might be. There has been no caching plugins added to my site since the last time SPC was working. I have no Siteground Caching activated on the server side and the SG Optimiser is deleted.

    Would any of the settings Brian suggested in his Cloudflare Optimisation article conflict with SFC?

    Can you offer any suggestions as to how I should troubleshoot this?

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @rickstar123

    I’m at a loss to understand why that might be. There has been no caching plugins added to my site since the last time SPC was working.

    I don’t have any idea either. You can try deleting the plugin from the WP Admin > Plugin section and freshly installing & setting up the plugin again to see if that works.

    Would any of the settings Brian suggested in his Cloudflare Optimisation article conflict with SFC?

    Cause his suggestions are not considering the usage of this plugin but rather normally using Cloudflare. You can follow his suggestion about the following things:

    1. Cloudflare SSL/TLS settings
    2. Cloudflare security settings
    3. Cloudflare speed settings (but don’t enable APO)
    4. Crawler Hints
    5. Cloudflare network settings

    But beside that, do not change other settings in your Cloudflare dashboard.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Page caching seems not working for both dynamic and static pages.’ is closed to new replies.