Answer the question
In order to leave comments, you need to log in
How to cache js file added by js script on click in browser?
Greetings! It is not possible to save the js-file in the browser cache, which is loaded while working with the site (so that the next time it is loaded from the cache).
The file URL does not change, the content does too.
Headers are sent
Cache-control: public
Expires: Wed, 31 Mar 2021 21:47:18 GMT
Pragma: no-cache
...
<script src="/path/to/file/" type="text/javascript"></script>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question