Browser not refreshing

I am having an issue with a P5 sketch that won’t update in Chrome.

If I do my tweaks, re-upload via FTP and refresh my browser, the updates don’t show in Chrome.

If I open a new incognito tab I do see the updates as expected.

It’s as if the browser is caching the sketch.js file even when I do a refresh.

If I refresh a little later I get the updated version.

Any idea?

Thanks

Phil

I use Cyber Duck to upload my sketches. For file transer I use SFTP and set localhost at 22. I guess the problem is because the server goes out unannounced, sometimes they work and sometimes they don’t, so keep uploading until it fixes itself. A little break or patience will suffice.

The problem I suppose is from the Web Hosting company. When that happens you can raise a problem.

The files gets uploaded ok with no errors as the sketch looks correct in incognito mode.

It’s certainly some kind of cache issue

Phil

If you have the ability to control the response headers specified for the files returned by your webhost add the following:

Cache-Control: no-store

Alternately anywhere you are referencing files on your web host you can add a cache busting query parameter such as a version number or random string:

https://yourhost/file.js?v=2

or

https://yourhost/file.js?nonce=k39gh3r9gjbme
2 Likes