Title: Page Cache &amp; functions.php &amp; A/B testing
Last modified: August 31, 2016

---

# Page Cache & functions.php & A/B testing

 *  [wonderdig](https://wordpress.org/support/users/wonderdig/)
 * (@wonderdig)
 * [10 years ago](https://wordpress.org/support/topic/page-cache-functionsphp-ab-testing/)
 * Hi
 * As I understand it, page caching serves flat HTML pages. So Javascript still 
   works OK, but no PHP runs.
 * Is this correct? Do no functions, hooks, actions, filters – does nothing run 
   inside functions.php? (after the first time the page is served until the cache
   expires?)
 * If I have a function/action in functions.php that grabs querystring parameters&
   sets cookies, will this run? (or will this only run the first time, and subsequent
   requests will set the same cookie values irrespective of the querystring parameters)
 * If I have a function/filter (a Gravity Forms hook/filter) that populates hidden
   fields from those cookie values, will that run (or will it run first time, and
   all subsequent requests will contain the same form values from the first time?)
 * Likewise, if I’m using an A/B testing tool like Optimizely or VWO (that uses 
   Javascript to manipulate the visitor experience), will these run correctly or
   will WP TOTAL CACHE interfere with their operation (and thus render my analytics
   data redundant)?
 * Any advice much appreciated.
 * Thanks
 * [https://wordpress.org/plugins/w3-total-cache/](https://wordpress.org/plugins/w3-total-cache/)

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

 *  [SJW](https://wordpress.org/support/users/whitsey/)
 * (@whitsey)
 * [10 years ago](https://wordpress.org/support/topic/page-cache-functionsphp-ab-testing/#post-7303024)
 * Each different query string will generate a different URL and therefore may never
   be cached.
 * Alternatively to avoid having the page cached, you can exclude it in Page Cache
   => Never cache the following pages: [https://www.itsupportguides.com/wordpress/w3-total-cache-how-to-exclude-posts-and-pages/](https://www.itsupportguides.com/wordpress/w3-total-cache-how-to-exclude-posts-and-pages/)
 *  Thread Starter [wonderdig](https://wordpress.org/support/users/wonderdig/)
 * (@wonderdig)
 * [10 years ago](https://wordpress.org/support/topic/page-cache-functionsphp-ab-testing/#post-7303029)
 * Thanks Shannon. I think that answers the first 2 questions (I can leave the cookie
   setting function in place, and I need to just set the page where hidden fields
   are populated with those cookie values to ‘never cache’).
 * What about A/B testing tools like Optimizely or VWO (Visual Web Optimiser) – 
   do you know if WP TOTAL CACHE can/will interfere with these?
 *  [SJW](https://wordpress.org/support/users/whitsey/)
 * (@whitsey)
 * [10 years ago](https://wordpress.org/support/topic/page-cache-functionsphp-ab-testing/#post-7303245)
 * I don’t have enough experience with these tools to know how they work or what
   they do to categorically answer for you – sorry.

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

The topic ‘Page Cache & functions.php & A/B testing’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [SJW](https://wordpress.org/support/users/whitsey/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/page-cache-functionsphp-ab-testing/#post-7303245)
 * Status: not resolved