Title: Using Cache-Control header
Last modified: September 27, 2023

---

# Using Cache-Control header

 *  Resolved [Guido](https://wordpress.org/support/users/guido07111975/)
 * (@guido07111975)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/using-cache-control-header-2/)
 * Hi,
 * My form plugin uses a Cache-Control header to disable (back/forward) cache:
 *     ```wp-block-code
       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](https://wordpress.org/support/users/vupdraft/)
 * (@vupdraft)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/using-cache-control-header-2/#post-17083730)
 * It shouldn’t do, all it should mean is the page is not cached.
 *  Thread Starter [Guido](https://wordpress.org/support/users/guido07111975/)
 * (@guido07111975)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/using-cache-control-header-2/#post-17084006)
 * 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](https://wordpress.org/support/users/vupdraft/)
 * (@vupdraft)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/using-cache-control-header-2/#post-17086398)
 * If this is on all of your pages, then I don’t think your site will be cached.
 *  Plugin Support [vupdraft](https://wordpress.org/support/users/vupdraft/)
 * (@vupdraft)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/using-cache-control-header-2/#post-17086463)
 * 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](https://wordpress.org/support/users/guido07111975/)
 * (@guido07111975)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/using-cache-control-header-2/#post-17086605)
 * 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.

 * ![](https://ps.w.org/wp-optimize/assets/icon-256x256.png?rev=1552899)
 * [WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance](https://wordpress.org/plugins/wp-optimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-optimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-optimize/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-optimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-optimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-optimize/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Guido](https://wordpress.org/support/users/guido07111975/)
 * Last activity: [2 years, 7 months ago](https://wordpress.org/support/topic/using-cache-control-header-2/#post-17086605)
 * Status: resolved