• Resolved myilraj05

    (@myilraj05)


    I have just installed this plugin for my WordPress blog. I am facing a weird problem after installing the plugin.

    The problem is–

    Cache-Control: max-age=3, must-revalidate

    I tried editing the htaccess file in the ‘Cache Folder’, but still, I am facing this issue. Please help me remove this Cache Control Header as because I have a custom Htaccess code already in place for the Browser caching.

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

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter myilraj05

    (@myilraj05)

    I will I get any support WP Super Cache team? It has been three days I am waiting over.

    Plugin Author Donncha O Caoimh (a11n)

    (@donncha)

    You can override the Cache-Control header in two ways:

    1. Set the new “Cache-Control” header using the constant WPSC_CACHE_CONTROL_HEADER. Define that somewhere, maybe in wp-config.php or in an mu-plugin.
    2. Use a filter called “wpsc_htaccess_mod_headers” to modify any headers you want. It takes one parameter, the headers. It’s an associative array.

    When you do either of those, go to the Advanced Settings, toggle the “Cache Delivery Method” back and forth. That will run the update code.

    Look at wp-content/cache/.htaccess to make sure the headers have updated.

    Thread Starter myilraj05

    (@myilraj05)

    Hi There,
    I have added the below code in the WP-Config file…

    define('WPSC_CACHE_CONTROL_HEADER', 'max-age=300, private');

    — —

    But, I did not able to find the wpsc_htaccess_mod_headers anywhere. Can you help me get the code?

    Plugin Author Donncha O Caoimh (a11n)

    (@donncha)

    There’s no need to use the filter if you define that constant. It’s one or the other. Did it work when you toggled the “Cache Delivery Method”?

    Thread Starter myilraj05

    (@myilraj05)

    It is working, but, I already have another Cache-Control header set manually added to htaccess file.

    SHOULD I REMOVE THAT?

    Plugin Author Donncha O Caoimh (a11n)

    (@donncha)

    You probably should remove it. Otherwise, you’ll wonder why it does nothing when you change it there. Because the other directive takes precedence.

    Thread Starter myilraj05

    (@myilraj05)

    Thank you for the Advice! Meanwhile, I want to ask one more doubt!
    Why should we add the word “Private” instead the previous Cache control was set to “Public”.

    Can you help me understand the actual process?

    Thread Starter myilraj05

    (@myilraj05)

    Hi, Is there anyone to help me learn and fix the issue.?

    Plugin Author Donncha O Caoimh (a11n)

    (@donncha)

    What does “private” do? That’s not really a question related to this plugin, but this page describes what that directive does:

    https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

    Thread Starter myilraj05

    (@myilraj05)

    Hi There,

    I did not find a solution. I am attaching the image screenshot for your reference. Go through it once to get an idea of my problem that I try to explain it to you.

    Image Link > https://imgur.com/a/8cjPvlh

    Plugin Author Donncha O Caoimh (a11n)

    (@donncha)

    So you have two Cache-Control headers? Unfortunately I don’t know how to remove one. I presume something else on your site is adding the second one. You’ll have to find out where. Not much we can do, sorry.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Remove (or) Modify Cache-Control Header’ is closed to new replies.