Disable Cache for sketch.js

Doing some development work, I am making incremental changes to the sketch.js file which is in the folder TEST on the web site testing.com - together with the other required files such as index.html, assets etc.
The problem is that if I browse to “testing.com/TEST” then the old file sketch.js is executed and not its newly edited version. This is very frustrating. and the only way I can get around it is to rename the directory TESTa, TESTb etc after every edit.
Any suggestions?

1 Like

If your browser cache is causing the problem you could try a hard refresh.

1 Like

Thanks very much. That did the trick. I had been trying all sorts of “no-cache” meta tags in the index.html file. A simple/effective solution - wish I had asked sooner.

Sorry, my congratulations were premature. It worked once but not again…?
Using Chrome on OSX: I also tried opening Developer tools and did a “Hard reload” and an “Empty Cache and hard reload”. Neither of those worked??
Any more ideas?

To answer my own question - a workable solution seems to be:
In the Index.html file, add a version number parameter to the sketch.js filename thus:
You then need to increment the version number every time you edit the sketch.js file…!