• Resolved wpeveryday

    (@wpeveryday)


    Hi, How do I fix this issue? This is the error I am getting.

    Page caching is working for static page but seems not working for dynamic pages.

    Error on dynamic page (https://wpsinhala.com): Invalid Cache-Control response header. If you are using Litespeed Server, please disable the option Overwrite the cache-control header for WordPress’s pages using web server rules, purge the cache and retry.

    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.

    Website: https://wpsinhala.com/

Viewing 1 replies (of 1 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    Hi @wpeveryday,
    Looking at your website response header I see the following issues:

    1. The cache-control header value of your website does not match the value of X-Wp-Cf-Super-Cache-Cache-Control – which means the plugin won’t be able to do it’s job properly. Screenshot: https://i.imgur.com/aVsH4wn.jpeg
      This generally happens when you have some other caching plugin present in the website which is overwriting the cache-control header or you have some server level rule set to add cache-control header. In both cases, please remove other caching plugin/server rules so that only this plugin manages the cache-control header. Please check from where this cache-control header value is getting added and remove that.
    2. There are a lot of cookies getting set to your webpages using set-cookie header. When CF sees the set-cookie header, it will not cache the webpages thinking the page content might be dynamically generated based on this cookie values. Please remove the plugins which are adding these cookies. Screenshot: https://i.imgur.com/DQ82umR.jpeg
Viewing 1 replies (of 1 total)

The topic ‘Overwrite the cache-control header for WordPress’s pages using web server rules’ is closed to new replies.