L
L
lexxand2018-03-10 13:07:25
WordPress
lexxand, 2018-03-10 13:07:25

How to exclude specific javascript from Wordpress caching?

In the footer.php file, I added my own javascript code, which should be executed on each page separately, every time the page is loaded. If the page is cached - the code does not work correctly, because. the cached version is given.
Is it possible to exclude a certain piece of code on a page from caching in the WP-SUPER CACHE plugin? Or maybe there are other plugins that can do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis, 2018-03-10
@sidni

Maybe put the code in a separate js file and include it in the footer

O
Orkhan Hasanli, 2018-03-10
@azerphoenix

Hello!
In theory, you can move the script to a separate file, as sidni noted.
And so in the Fastest Cache plugin it is possible to add exceptions
Screen - https://screenshots.firefox.com/auyUBl0UycIWv9ZK/m
...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question