WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. MarkFromGermany
    Member
    Posted 3 months ago #

    Hi,

    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.
    Description:
    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.

    Yours,
    Mark

    http://wordpress.org/plugins/popup-with-fancybox/

  2. fdeflint
    Member
    Posted 2 months ago #

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

  3. tomdkat
    Member
    Posted 1 month 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?

    Peace...

Reply

You must log in to post.

About this Plugin

About this Topic