• Resolved Guido

    (@guido07111975)


    Hi,

    My form plugin uses a Cache-Control header to disable (back/forward) cache:

    header( 'Cache-Control:no-store, max-age=0' ); 

    After succesful submission my site visitor is being redirected to a thank you page. I’ve added the Cache-Control header to avoid that visitor is seeing the filled in form again when pressing the back button of his/her browser.

    My question:
    Will this header cause a conflict with WP Optimize?

    Guido

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support vupdraft

    (@vupdraft)

    It shouldn’t do, all it should mean is the page is not cached.

    Thread Starter Guido

    (@guido07111975)

    Thanks.
    What if this Cache-Control header is present at all pages of the website? Will this override the WP Optimize settings?

    Guido

    Plugin Support vupdraft

    (@vupdraft)

    If this is on all of your pages, then I don’t think your site will be cached.

    Plugin Support vupdraft

    (@vupdraft)

    It might be a better Idea to remove this header and enter the page that your contact form under “URLs to exclude from caching” from Cache >> Advanced settings

    Thread Starter Guido

    (@guido07111975)

    Hi,

    Thanks for your reply.
    I was already doubtful about adding a custom header to my plugin, so I will look for another solution. Can always add autocomplete="off" to my form to prevent input values being saved by the browser.

    Guido

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

The topic ‘Using Cache-Control header’ is closed to new replies.