I have a UIWebView that loads html, css and javascript.
When ever I do a change in the html or css, that is applied ones I reopen the WebView. But my JavaScripts seems to be cached, changes in them dosen’t get visbile when reopen the WebView.
What am I missing here?
This answer helped me:
Prevent caching of .css files in UIWebView loaded from disk
Basically, you just need to add an incrementer as parameter to the link like
?version=1or?time=12345678. For example:<script src="myscript.js?version=123></script>For a dynamically loaded javascript I’m using:
and the script is updated properly, without the version parameter the file is cached in the UIWebView.