Title: Creating no-cache headers?
Last modified: November 7, 2017

---

# Creating no-cache headers?

 *  Resolved [Chrissy](https://wordpress.org/support/users/paperkawaii/)
 * (@paperkawaii)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/creating-no-cache-headers/)
 * Hi there, I’d love to keep using your plugin.
 * I use varnish cache, and just noticed that your plugin prevents it from being
   cached.
 * I unticked the create javascript cache but that had no effect.
 * Is there a reason for this, or is this an error?

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

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/creating-no-cache-headers/#post-9658469)
 * Hello,
 * Actually, the plugin should not prevent or affect the use of varnish cache, however,
   I recommend you activate the option: “Activate Javascript Cache” in the settings
   page of the plugin (accessible through the menu option: “Settings/Calculated 
   Fields Form”).
 * Could you send me the link to the webpage where the form is inserted, please?
 * Best regards.
 *  Thread Starter [Chrissy](https://wordpress.org/support/users/paperkawaii/)
 * (@paperkawaii)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/creating-no-cache-headers/#post-9658598)
 * Hi, thanks for your reply 🙂
 * Ok, well I had that option ticked from the beginning but tried it with and without.
   
   I have enabled the plugin again and you can view a form [here](https://www.paperkawaii.com/origami-paper-ratio-calculator/).
 * I have been through and already deactivated all plugins and used a default theme
   and this plugin is the only one to effect the varnish cache.
 * However, it could be that the varnish ‘status’ is incorrect, I am not sure how
   to check it is working or not, I can only go by what the status message is, I
   uploaded a screenshot of what it says [here](https://www.paperkawaii.com/wp-content/uploads/2017/11/Screen-Shot-2017-11-07-at-10.03.57-pm.png).
   After deactivating the plugin, the error messages do not come up.
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/creating-no-cache-headers/#post-9658644)
 * Hello [@paperkawaii](https://wordpress.org/support/users/paperkawaii/),
 * I guess the issue may be caused by the use of cookies. There are many plugins
   that clear the session variables, and has been a necessity emulate the session
   with transients and store the session id as a cookie.
 * Please, tries the following modification, and let me know if the modification
   solves the conflict.
 * 1. Open the “/wp-content/plugins/calculated-fields-form/inc/cpcff_session.inc.
   php” file with the text editor of your choice.
 * 2. Go to the piece of code:
 * `if(!headers_sent())`
 * and edit it as follows:
 * `if(false && !headers_sent())`
 * Best regards.
 *  Thread Starter [Chrissy](https://wordpress.org/support/users/paperkawaii/)
 * (@paperkawaii)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/creating-no-cache-headers/#post-9658663)
 * Hey, I made the change however it did not help.
 * I also checked on a varnish cache checking website, and it’s definitely preventing
   the cache from working.
 *  Thread Starter [Chrissy](https://wordpress.org/support/users/paperkawaii/)
 * (@paperkawaii)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/creating-no-cache-headers/#post-9658668)
 * Why set this topic as resolved? It is not…
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [8 years, 7 months ago](https://wordpress.org/support/topic/creating-no-cache-headers/#post-9658695)
 * Honest question because as a moderator I get a different view than you get: can
   you unresolve your topic on the right sidebar?
 *  Thread Starter [Chrissy](https://wordpress.org/support/users/paperkawaii/)
 * (@paperkawaii)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/creating-no-cache-headers/#post-9658704)
 * [@jdembowski](https://wordpress.org/support/users/jdembowski/) ah, sure I didn’t
   know I could do that…. yes it is not solved 🙂
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [8 years, 7 months ago](https://wordpress.org/support/topic/creating-no-cache-headers/#post-9658706)
 * Cool! I wasn’t sure you could. 😉
 * Plugin and theme authors can do that but so can the person who opened the topic
   as you just found out.
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/creating-no-cache-headers/#post-9658745)
 * Hello [@paperkawaii](https://wordpress.org/support/users/paperkawaii/),
 * Please, follow the steps below:
 * 1. Open the “/wp-content/plugins/calculated-fields-form/inc/cpcff_session.inc.
   php” file with the text editor of your choice.
 * 2. Go to the piece of code:
 * `if( session_id() == "" ) @session_start();`
 * and edit it as follows:
 *     ```
       id(!is_admin()) return;
       if( session_id() == "" ) @session_start();
       ```
   
 * Best regards.
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/creating-no-cache-headers/#post-9658748)
 * I’m sorry, I’ve a typo in the code:
 *     ```
       if(!is_admin()) return;
       if( session_id() == "" ) @session_start();
       ```
   
 * Best regards.
 *  Thread Starter [Chrissy](https://wordpress.org/support/users/paperkawaii/)
 * (@paperkawaii)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/creating-no-cache-headers/#post-9658784)
 * It’s working! That’s great, thanks!
 * Will these things be overwritten in future updates though?
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/creating-no-cache-headers/#post-9658804)
 * Hello [@paperkawaii](https://wordpress.org/support/users/paperkawaii/),
 * In the free version of the plugin the session is not essential in the public 
   forms, but for the other distributions (the Professional, Developer, and Platinum)
   the session variables are needed. So, we can include the modification in the 
   free version of the plugin but not in the other distributions.
 * I’ll mark this topic as resolved.
 * Best regards.

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

The topic ‘Creating no-cache headers?’ is closed to new replies.

 * ![](https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg?rev=1734377)
 * [Calculated Fields Form](https://wordpress.org/plugins/calculated-fields-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/calculated-fields-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/calculated-fields-form/)
 * [Active Topics](https://wordpress.org/support/plugin/calculated-fields-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/calculated-fields-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/calculated-fields-form/reviews/)

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)
 * [headers](https://wordpress.org/support/topic-tag/headers/)
 * [no-cache](https://wordpress.org/support/topic-tag/no-cache/)

 * 12 replies
 * 3 participants
 * Last reply from: [codepeople](https://wordpress.org/support/users/codepeople/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/creating-no-cache-headers/#post-9658804)
 * Status: resolved