cabrerahector / wordpress-popular-posts

WordPress Popular Posts - A highly customizable WordPress widget that displays your most popular posts.
https://wordpress.org/plugins/wordpress-popular-posts/
GNU General Public License v2.0
279 stars 83 forks source link

Widget without POST request #346

Closed AnonDev1312 closed 1 year ago

AnonDev1312 commented 1 year ago

Cloudflare is unable to cache the popular posts JSON file because the widget gets it with a POST request and CF is unable to cache POST requests without workers, even if you set a page rule. I tried disabling AJAX in the plugin settings but still doing the POST :(

It would be nice to have the option to disable the POST request so the JSON can be served from a CDN. The JSON file takes over 2 seconds to load on our site, and all other files are under 600ms.

cabrerahector commented 1 year ago

Hi @Ungov77,

The POST request you're seeing is WordPress Popular Posts updating the views count of your posts/pages. Cannot be "disabled" as that's a core functionality of the plugin.

The "Ajaxfify Widget" option (which can be turned on/off) uses GET to -no pun intended- get widget's data so it can be rendered on screen. Has nothing to do with the POST requests you're seeing.