Support » Plugin: WP Cloudflare Super Page Cache » Admin bar in cache – litespeed lscache

  • Resolved rick1971

    (@rick1971)


    I have the litespeed cache plugin plus your plugin installed. Sometimes I see the admin bar when visiting in incognito mode as a guest. I’ve tried both settings for “overwrite the cache control header”

    When checking server response headers, s-maxage values of X-WP-CF-Super-Cache-Cache-Control response header are not the same as the ones in Cache-Control response header. I then tried enable for the “Overwrite the cache-control header for WordPress’s pages using web server rules” and made sure it was at the end of the htaccess file. This didn’t seem to make any different for either the cache-control response header or preventing the admin bar from being stored in cache.

    Any other suggestions to try?

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Saumya Majumder

    (@isaumya)

    Hi @rick1971,
    While visiting your website I don’t see admin bar on any page/posts.

    Thread Starter rick1971

    (@rick1971)

    In order to avoid the admin bar being cached, I purged the cache and didn’t visit and pages again while logged in.

    I also don’t know how many cloudflare servers pickup my pageviews, but when I just purged the cache, visited my home page a few times while logged in, and then went to incognito mode, the admin bar is there now. I won’t purge the cache, but I don’t know how long it’ll be there and how widespread my visits are cached.

    Plugin Contributor Saumya Majumder

    (@isaumya)

    Hi @rick1971,
    Can you show me a screenshot of the response header when you are open a page while being logged in (I mean where you see the admin bar).

    If you don’t know how to do that, check the video in the plugin description, It is shown there how to do that.

    Thread Starter rick1971

    (@rick1971)

    This is what I get but I can send a better screenshot tonight.

    URL 1: https://www.medical-jokes.com – Response 200
    Date: Thu, 21 Jan 2021 15:09:15 GMT
    Content-Type: text/html; charset=UTF-8
    Transfer-Encoding: chunked
    Connection: keep-alive
    X-Powered-By: PHP/7.2.34
    Link: ; rel=”https://api.w.org/”
    Link: ; rel=shortlink
    Cache-Control: max-age=1800, s-maxage=31536000
    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-Cookies-Bypass: swfpc-feature-not-enabled
    Link: ; rel=preload; as=style,; rel=preload; as=script,; rel=preload; as=script
    X-LiteSpeed-Cache: hit
    Vary: Accept-Encoding
    X-Turbo-Charged-By: LiteSpeed
    CF-Cache-Status: HIT
    Age: 308
    cf-request-id: 07c7172cff0000740539ac3000000001
    Expect-CT: max-age=604800, report-uri=”https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”
    Report-To: {“group”:”cf-nel”,”max_age”:604800,”endpoints”:[{“url”:”https:\/\/a.nel.cloudflare.com\/report?s=kbrXa3Etuh2cvKmKVe%2BmDGKZJJphqn9QuiYmwAK8oqJLSqcWhn3rXshrxuh3bGRfpcnRaZn1zW5jjqk8Eje7AwM4dP%2FOqqM0wlNKe9rvmG%2FknU%2B1PAA%3D”}]}
    NEL: {“max_age”:604800,”report_to”:”cf-nel”}
    Server: cloudflare
    CF-RAY: 6151f48e6bed7405-IAD

    Plugin Contributor Saumya Majumder

    (@isaumya)

    Can you please share a screenshot? I wanna see it n action. This is so wired.

    Thread Starter rick1971

    (@rick1971)

    I think I may have figured out the problem. I must have revisited the page without /?swcfpc=1 cache busting code while logged in to my account. I will be more careful not to do that, but I assume that could explain the problem, correct?

    Thanks for an excellent plug-in.

    Plugin Contributor Saumya Majumder

    (@isaumya)

    Hi @rick1971,
    Yes that can be the reason. When using the default page rule mode for caching you should never manually remove the cache buster ?swcfpc=1 from the URL.
    If you do not like the cache buster to be shown you can always enable the worker mode under the Cache tab which will turn off the cache buster as in worker mode cache buster is not needed. But do note that Cloudflare workers are not 100% free like page rules. It allows 100,000 requests per day. After which you have to pay. Learn more here: https://workers.cloudflare.com/#plans

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.