Title: hattoomy's Replies | WordPress.org

---

# hattoomy

  [  ](https://wordpress.org/support/users/hattoomy/)

 *   [Profile](https://wordpress.org/support/users/hattoomy/)
 *   [Topics Started](https://wordpress.org/support/users/hattoomy/topics/)
 *   [Replies Created](https://wordpress.org/support/users/hattoomy/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/hattoomy/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/hattoomy/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/hattoomy/engagements/)
 *   [Favorites](https://wordpress.org/support/users/hattoomy/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance] Preload different versions based on cookie consent](https://wordpress.org/support/topic/preload-different-versions-based-on-cookie-consent/)
 *  Thread Starter [hattoomy](https://wordpress.org/support/users/hattoomy/)
 * (@hattoomy)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/preload-different-versions-based-on-cookie-consent/#post-15306746)
 * [@bornforphp](https://wordpress.org/support/users/bornforphp/) Looking forward!
   thank you :=)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance] Preload different versions based on cookie consent](https://wordpress.org/support/topic/preload-different-versions-based-on-cookie-consent/)
 *  Thread Starter [hattoomy](https://wordpress.org/support/users/hattoomy/)
 * (@hattoomy)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/preload-different-versions-based-on-cookie-consent/#post-15296093)
 * Please add this feature 🥳🥳🥳
    Or if there is a code I could add in my child
   theme?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance] cookie consent cache pages](https://wordpress.org/support/topic/cookie-consent-cache-pages/)
 *  Thread Starter [hattoomy](https://wordpress.org/support/users/hattoomy/)
 * (@hattoomy)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/cookie-consent-cache-pages/#post-15274599)
 * [@bornforphp](https://wordpress.org/support/users/bornforphp/)
    Hi,
 * One more thing I have noticed. When I purge a page’s cache, the version without
   cookie consent is not purged somehow. Can we have both versions of the same page
   purged?
 * If I am starting to become annoying you can tell me 😛
    I just think that all
   input is good input, and I really believe in your plugin. Actually I love your
   plugin and that’s why I am here!
 * Regards,
    Haytham
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance] cookie consent cache pages](https://wordpress.org/support/topic/cookie-consent-cache-pages/)
 *  Thread Starter [hattoomy](https://wordpress.org/support/users/hattoomy/)
 * (@hattoomy)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/cookie-consent-cache-pages/#post-15262353)
 * [@bornforphp](https://wordpress.org/support/users/bornforphp/)
    Hello again,
 * Thank you for the last update guys!
    It’s so cool to get two versions cached,
   one with cookie consent and one without. This is a brilliant solution.
 * Is there a way that the preloader preloads both versions (with cookie consent
   and without)?
    Right now it only preloads pages without cookie consent. But for
   visitors who already accepted cookies. They don’t see any preloaded pages.
 * Regards,
    Haytham
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance] cookie consent cache pages](https://wordpress.org/support/topic/cookie-consent-cache-pages/)
 *  Thread Starter [hattoomy](https://wordpress.org/support/users/hattoomy/)
 * (@hattoomy)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/cookie-consent-cache-pages/#post-15055173)
 * [@bornforphp](https://wordpress.org/support/users/bornforphp/) Hey Harshad!
 * Thank you but unfortunately I couldn’t really benefit from the code. Nothing 
   has changed in the caching behavior. Cookies are being cached either ways.
 * The code should prevent the visitor without “cookie_notice_accepted” cookie from
   being served cached pages and from caching pages. The only exception to that 
   would be the “wpo_cache_preloader”. I could achieve this with my code, but unfortunately
   the preloader was included in the “don’t serve cache + don’t cache rule”.
 * if(empty($_COOKIE[‘cookie_notice_accepted’])){
    return; }
 * We need to give the preloader a “cookie_notice_accepted” cookie somehow?
 * Thanks again!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance] cookie consent cache pages](https://wordpress.org/support/topic/cookie-consent-cache-pages/)
 *  Thread Starter [hattoomy](https://wordpress.org/support/users/hattoomy/)
 * (@hattoomy)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/cookie-consent-cache-pages/#post-15039643)
 * I am using this cookie plugin
    [https://wordpress.org/plugins/cookie-notice/](https://wordpress.org/plugins/cookie-notice/)
 * The plugin blocks scripts. I have my cookies scripts (Google analytics etc) in
   the plugin. They are injected in the HTML after giving consent (clicking on ok).
 * When the user visits pages with cookies on, the cookies are cached because the
   html page is cached. You know what I mean. Then new visitors get a cached page
   with cookies and a cookie consent that is not functional anymore because the 
   cookies are already there and running.
 * I solved this by disabling cached pages for a new user that hasn’t given consent
   yet. The problem is that this rule applies to the preloader as well. The preloader
   runs okay but pages aren’t cached.
 * I hope you understood, it is not easy to explain 😀
    Thank you!

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