• Resolved Gulshan Kumar

    (@thegulshankumar)


    Dear LiteSpeed Cache Plugin developer,

    I hope this message finds you well. We have recently observed that our homepage is being cached in the browser for 7 days, which is unexpected given our site updates every 5-10 minutes during working hours. While it’s acceptable to store page cache internally for 7 days, caching in the browser is causing issues due to the frequent updates.

    As a temporary measure, I modified the .htaccess code (linked to gist) to disable the browser cache. However, I would appreciate your assistance in providing an appropriate solution to ensure proper cache management without affecting the page’s update frequency.

    Thank you for your attention to this matter. I look forward to your prompt guidance.

    Best regards,
    Gulshan Kumar

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support litetim

    (@litetim)

    Plugin Support qtwrk

    (@qtwrk)

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

    assuming all of your pages are ending with / in URL , then please try this code snippet

    Thread Starter Gulshan Kumar

    (@thegulshankumar)

    I believe this issue is not related to LiteSpeed cache.

    The <IfModule mod_expires.c> block appears to have been added in an unusual way within the # BEGIN WordPress section. It is highly unlikely that LS Cache added it this way. Most likely, another developer added this code intending to improve performance but inadvertently ended up caching HTML incorrectly.

    Here’s how I fixed it.

    • Removed the entire entries of .htaccess except the default rewrite rules of WP.
    • Clicked “Reset” button in the LiteSpeed. I love this reset button, it usually set the SAFEST settings for my site.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘How do I completely avoid browser cache for HTML?’ is closed to new replies.