How to not cache some widgets?
-
Hello,
We have some widgets that display random content in some places of the template. Is there a way to not cache them?
Thank you
-
Howdy @ruzakuku – it sounds like the widgets you have that display random content may be dynamic elements – caching plugins like WP Super Cache generate static HTML files for entire pages which means all content – including widgets – get cached.
There are some ways to work around which may include the use of a developer to load dynamic content via JavaScript or AJAX after the page loads. This would allow the static cached page to be served quickly and allow the widget content to be fetched dynamically and remain up to date for each user.
Aside from that you can decide to exclude certain pages with those widgets via the WP Super Cache advanced settings.
Please let us know if you have any further questions.
Hi there, @ruzakuku,
This thread is being quiet for more than a week, so I’m going to mark this thread as solved for now. If you have any further questions or need more help, you’re welcome to open another thread here. Cheers!
Hello thank you for reply, but what you recommend looks a big work. Another cache plugin allows to not cache specific elements, will have a look.
Hi there, @ruzakuku,
Thanks for taking the time to let us know about that – we’re sorry to see you go!
If you give our plugin another go in the future, and whether you will have any further questions or need more help, you’re welcome to open another thread here. Cheers!
The topic ‘How to not cache some widgets?’ is closed to new replies.