lesterchan / wp-polls

Adds an AJAX poll system to your WordPress blog. You can also easily add a poll into your WordPress's blog post/page.
https://wordpress.org/plugins/wp-polls/
93 stars 78 forks source link

Make WP Polls work with caching plugins enabled (eg. W3TC support) #103

Closed djvdorp closed 6 years ago

djvdorp commented 6 years ago

First of all, thanks for your work on the plugin @lesterchan ! It is appreciated and used very often.

Also, we have already seen your posts here: https://wordpress.org/support/topic/wp-polls-not-working-with-wp-fastest-cache-enabled/

There you said:

I don’t use caching plugin myself and my plugins are generally dated, so it will not work with any caching plugins

On some of my sites we are using W3 Total Cache, and we noticed that it broke WP Polls.

Could you give us some clues on why it breaks, and what should be adapted to fix it? Any guidance would be appreciated, so that we could consider fixing it with some more knowledge?

lesterchan commented 6 years ago

Based on what I understand, caching plugin tends to cache the HTML rendered output and since the polls are not loaded by AJAX, it will stay cached.

I think a good start for you is basically see if you can load the polls into your template using JS.

krombox commented 6 years ago

Hi. It will be nice to have this feature out of the box. All sites which uses cache can't use this plugin normally

djvdorp commented 6 years ago

We switched to Democracy Polls.

krombox commented 6 years ago

@djvdorp i found it also, but for some reason it still caching poll with WP-Rocket. For you it works well? What cache plugin you are using? W3 Total Cache?

djvdorp commented 6 years ago

@krombox we run W3TC (W3 Total Cache) with Democracy Polls, but no caching for logged in users.