How to find Dynamic content scripts to exclude from cache




Wordpress LScache Plugin: How to find Dynamic content scripts to exclude from cache

Last Updated on: Wed, 15 Apr 2026 00:00:02
Just started using LS on my sites and few have a page view counter at the top. Every time the page loads the counter goes up one. With cache on those pages it will not count as I know enough that they have a counter that is a dynamic element. Try as I may I can not source out which CSS or JS file needs to be excluded. (as there are many) Anyone know of tools out there to find this function and isolate it to spot what make is run. I have been at this issue all year and other cache plugins do the same thing. I understand the concept why this happens but the solution, well it seem involved or is it? cheers Dan The page I need help with: https://ontariobiketrails.com/item/harold-town-mtb-trails/ Hi, Dan I looked around a little bit, but I was unable to figure it out either. Is the counter part of the theme? Is it a plugin? Or is a custom addition? If its part of the theme or a plugin, the developer could probably tell you what controls the counter. Another option is to make the area that contains the counter into an uncached ESI block. We have some examples written up that explain how to do it. If youre not a developer yourself, you can try sharing the ESI functions and hooks with the developer of your theme/plugin, and maybe theyd be willing to include it in their code. Hope this helps! Hi Thanks for poking around. The function is baked into the theme. I am not much of a developer, though I am familiar with Chrome Dev Tools. Yes the ESI concept is a good one but beyond me. Will look into it (not that I need a challange) or hire someone. Figure this issue with dymnamic pages is tricky. thanks Dan BTW LS Rocks ^) Glad youre enjoying LiteSpeed! Definitely try contacting the author of the theme ? if they can tell you what is controlling the counter, maybe a more simple solution will present itself Good luck!



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference