• Resolved Nate

    (@goseongguy)


    Hello,

    I have been very glad to use this plugin (on https://goseongguy.com/).

    I’ve been using Worker Mode. The Test Cache always fails, but I’ve been ignoring that because I can see cf-cache-status HIT on the root HTML document.

    But, these days I’m wondering if there really is no issue? When I do Test Cache, it says:

    “Page caching seems not working for both dynamic and static pages.
    Error on dynamic page (https://goseongguy.com): Unable to find the X-WP-CF-Super-Cache-Worker-Status response header. Worker mode seems not working correctly.
    Error on static resource (https://goseongguy.com/wp-content/plugins/wp-cloudflare-page-cache/assets/testcache.html): Unable to find the Cache-Control response header.”

    So I guess my question is: Is it OK that I don’t have the X-WP-CF-Super-Cache-Worker-Status response header for Worker Mode? Does this mean the plugin is not actually using Worker Mode?
    If this header is necessary for Worker Mode, do you have any guide or things to investigate about why that is missing?

    Cheers,
    Nate

Viewing 8 replies - 16 through 23 (of 23 total)
  • Thread Starter Nate

    (@goseongguy)

    And when I click the Preview tab, I see this: https://imgur.com/mpQLMAC

    Uh oh…
    Error communicating with origin server swcfpc_worker_1619093168.natedolesh1465.workers.dev
    Details
    TLS peer’s certificate is not trusted; reason = Hostname mismatch

    The Service Workers Cache API is currently unimplemented in the Cloudflare Workers Preview. Cache API operations which would function normally in production will not throw any errors, but will have no effect. Notably, Cache.match() will always return undefined, and Cache.delete() will always return false. When you deploy your script to production, its caching behavior will function as expected.
    handleRequest @ worker.js:304
    (anonymous) @ worker.js:486

    • This reply was modified 2 years, 7 months ago by Nate.
    Plugin Contributor iSaumya

    (@isaumya)

    And when I click the Preview tab, I see this: https://imgur.com/mpQLMAC

    – You can’t preview this worker as there is nothing to Preview. This is a logical worker, not a worker generating any preview. You need to click on the HTTP tab and then enter one of your site URLs to check the response header you are getting. That’s the most you can do.

    Thread Starter Nate

    (@goseongguy)

    Interesting! When I do as you say above in the HTTP tab, the worker header is there!

    View post on imgur.com

    200 OK
    cache-control:s-maxage=31536000, max-age=60
    cf-cache-status:MISS
    cf-ray:6fb8018b89eb6339-ORD
    content-type:text/html; charset=UTF-8
    date:Wed, 13 Apr 2022 23:33:19 GMT
    expect-ct:max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
    host-header:c2hhcmVkLmJsdWVob3N0LmNvbQ==
    last-modified:Wed, 13 Apr 2022 21:18:25 GMT
    referrer-policy:no-referrer-when-downgrade
    server:cloudflare
    transfer-encoding:chunked
    vary:Accept-Encoding
    x-content-type-options:nosniff
    x-frame-options:SAMEORIGIN
    x-wp-cf-fallback-cache:1
    x-wp-cf-super-cache:cache
    x-wp-cf-super-cache-active:1
    x-wp-cf-super-cache-cache-control:s-maxage=31536000, max-age=60
    x-wp-cf-super-cache-worker-status:miss
    x-xss-protection:1; mode=block

    But the header is not there when the page is visited directly through a browser from people like you and me.

    • This reply was modified 2 years, 7 months ago by Nate.
    Plugin Contributor iSaumya

    (@isaumya)

    Huh! That is indeed super interesting. If CF is sending that header then where it is going? This is super odd and crazy. You need to dig further to see what’s going on. Now you have all the tools to test.

    I would suggest creating a dummy site on a dummy domain on your server and test the plugin there. So, as it will be a fresh site with just this plugin and worker mode you would be able to pinpoint what might be going on.

    Thread Starter Nate

    (@goseongguy)

    I hope it’s OK to return to report that this has now resolved itself! I am not sure exactly what the issue was, but I have noticed that some other minor issues got resolved from a recent plugin update from Autoptimize (cleared up some console errors relating to security), and maybe Cloudflare had an issue with the way the HTML or requests were being handled…I don’t know. But all is working now. Thank you again for your A+ support.

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @goseongguy,
    Thank you so much for your report. Please consider sharing a review in the review section of the plugin.

    Thread Starter Nate

    (@goseongguy)

    Sure thing, I’ve updated my review to 5 stars.

    Plugin Contributor iSaumya

    (@isaumya)

    Thank you so much Nate. ??

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘Missing X-WP-CF-Super-Cache-Worker-Status response header’ is closed to new replies.