• Resolved everade

    (@everade)


    Despite “Cache WP-Admin” being set to “OFF”

    My entire wp-admin is cached. So each time i update a plugin, then revisit the updates section, it shows the old plugin updates which have already been installed a long time ago. This issue is persistent throughout all wp-admin pages, so i’m always forced to navigate to a page, then REFRESH the page, before I can actually start using it.

    This is not just extremely annoying but also inflicts issues in which i save old settings or changes just because i forgot to refresh the page.

    What exactly is causing this? I’ve been testing all kinds of settings but this issue seems to persist no matter what i try.

    • This topic was modified 11 months, 2 weeks ago by everade.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support qtwrk

    (@qtwrk)

    plugin itself doesn’t do this

    please check what is the http response header from any admin page

    Thread Starter everade

    (@everade)

    I’ve no idea what i’m supposed to look for.
    Basically everything is loaded from local cache, including the main .php file from each page.

    General
    Request URL:
    https://redacted.website/wp-admin/plugins.php
    Request Method:
    GET
    Status Code:
    200 OK (from disk cache)
    Remote Address:
    [redacted:redacted:redacted:redacted:redacted:redacted]:443
    Referrer Policy:
    no-referrer-when-downgrade
    
     Response Headers
    Alt-Svc:
    h3=":443"; ma=86400
    Cache-Control:
    max-age=31536000
    Cf-Cache-Status:
    DYNAMIC
    Cf-Ray:
    redacted-MXP
    Content-Encoding:
    br
    Content-Security-Policy:
    upgrade-insecure-requests
    Content-Type:
    text/html; charset=UTF-8
    Date:
    Thu, 07 Dec 2023 16:43:24 GMT
    Expires:
    Wed, 11 Jan 1984 05:00:00 GMT
    Permissions-Policy:
    camera=(), microphone=(), geolocation=(self), fullscreen=(self)
    Platform:
    hostinger
    Referrer-Policy:
    no-referrer-when-downgrade
    Server:
    cloudflare
    Vary:
    Accept-Encoding
    X-Content-Type-Options:
    nosniff
    X-Frame-Options:
    SAMEORIGIN
    X-Litespeed-Cache-Control:
    no-cache
    X-Turbo-Charged-By:
    LiteSpeed
    X-Xss-Protection:
    0
    
    Plugin Support qtwrk

    (@qtwrk)

    Cache-Control:
    max-age=31536000

    this one is culprit

    wordpress page should gives cache-control: no-cache, must-revalidate, max-age=0 , no-store header to disable browser cache

    most likely from your CF cache setting , set it to respect origin header or something

    Thread Starter everade

    (@everade)

    That is already the case. On CF the Browser Cache TTL is set to “Respect Existing Headers”

    So i guess this one here is the culprit then
    It’s set in the mod_headers.c :
    Header always set Cache-Control: max-age=31536000

    I assume that overwrites the mod_expires.c definitions created by LightSpeed Cache?!

    By the way, thank you very much for your support despite already having pointed out that it’s not casued by LightSpeed Cache, really appreciate it!

    Plugin Support qtwrk

    (@qtwrk)

    yes , for browser , cache-control will take precedence over expire if both exists and LSCWP doesn’t set expire over HTML page though.

    but you can use

    	SetEnvIf Request_URI "/$" change_header
    	Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0" env=change_header

    to put no-cache over any URI that ends with / which by default , all wp page does that way.

    Thread Starter everade

    (@everade)

    Yes it was indeed the culprit.
    Thank you so much!

    Thread Starter everade

    (@everade)

    @qtwrk
    Is there any specific reason why LiteSpeed Cache sets the mod_expires by default to A31557600 instead of A31536000 ?
    1 year equals 60s * 60m * 24h * 365d = 31536000

    Also these are deprecated:
    ExpiresByType application/javascript A31557600
    ExpiresByType application/x-javascript A31557600

    And if i recall that correctly then jpeg already includes jpg, so the mime-type jpg is redundant.

    Not sure about x-font-tff and x-font-woff, but i assume those could be deprecated as well.

    Just letting you know. Maybe you have reasons to add these.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Admin Page Caching issue’ is closed to new replies.