Support » Plugin: Picasa and Google Plus Express » PhotoSwipe not always being used (wp super cache conflict?)

  • Hi I noticed that even though I have set the plugin to use PhotoSwipe, it sometimes will use another lightbox and layout instead (seems like thickbox or high slide). If I clear my wp super cache and reload the page, it seems to take the correct one. But then in the future may be changed again. My suspicion (although it is only that) is that some client is loading the page and somehow PhotoSwipe isn’t supported for them, and the plugin falls back to another method? And after that (because of the cache) I am seeing the other method? Again this is just a guess, any help would be appreciated. I want to force the plugin to always display the way I see it when I load the page in any of my browsers, ie always use PhotoSwipe. Any ideas?


Viewing 1 replies (of 1 total)
  • Hi Stephen,
    I had a similar problem with WP Super Cache (“WPSC”).
    The problem is that a cache file has no php “logic” inside it; it uses the html generated by the php scripts the last time the page was generated.
    However, WPSC doesn’t (in this case) store different versions of the html (some plugins work around this, but tend to involve using a separate mobile theme).

    So the page images in the cache (which includes the test for whether to include Photoswipe scripts) are generated based on whether the user agent is mobile or not.
    Subsequent requests use that same page image – irrespective of the actual request device – until the cached page is regenerated.
    So it’s a fairly random process as to whether the cached page includes the desktop or mobile version of your page.

    I tried W3 Total Cache (“W3TC”), and it seems to work around this, although configuration is a bit more complicated. However, it also manages minify and compression, so you don’t need separate plugins for that.
    Specifically, there’s a tab to “Manage User Agent Groups”. By checking both of these groups, separate cache files are created for each user agent group, and W3TC serves the page image relevant to the device requesting the page.
    (Note : I also had to delete a duplicate agent – bb10 – which appears in both UA groups in the current release).

    Hope this helps,

Viewing 1 replies (of 1 total)
  • The topic ‘PhotoSwipe not always being used (wp super cache conflict?)’ is closed to new replies.