Popup with fancybox
Has difficulties with W3 Total Cache, a suggestion (3 posts)

  1. MarkFromGermany
    Posted 1 year ago #


    thank you for creating this plugin. I do have one problem when using it in conjunction with w3 total cache, and I think it's due to your design decision to use php sessions instead of browser cookies for the "display only once" mechanism.

    In short, it's not compatible with w3tc.
    Situation 1: If I clear the cache and visit my site, the plugin shows (since its "display=YES" code is triggered. w3tc now saves this state into the cache, so on any subsequent visit, it will *always* show the pop-up (instead of only once), to every visitor.
    If I now go to another page, the display=NO code is now in effect, and that other page will NOT show the pop-up (as expected). However, since now the "no-popup" version is saved into w3tc, any new/other visitor that enters via this page will *never* get to see the pop-up.

    Since the decision for "popup yes/no" is based on Cookies anyway, my suggestion would be to move that logic into the Javascript code, instead of the PHP code. i.e. once the popup shows, it also sets a cookie "already shown this pop-up" in the browser. Also, *before* it opens the pop-up, it should check if this cookie already exists. Just make the cookie "valid until end of session", and your plugin is caching-compatible and behaves with or without caching just like before.



  2. fdeflint
    Posted 1 year ago #

    Yes please, that would be great! I also use w3 Total cache

  3. tomdkat
    Posted 1 year ago #

    Ah, great observation! I also use W3TC and I didn't think about the impact that would have on the popup behavior. Would it be possible to have W3TC ignore the Cookie used by popup with fancybox?


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Popup with fancybox
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic