When does Rocket Loader update cached files in localStorage?

I think that Rocket Loader not working properly( never purges the localStorage cache). We looked a bit to the rocket.min.js code and found that it normally does not check cached files whether they are expired or not. Also, on our site, we have a lot of very old cached scripts that was saved to localStorage 2 weeks ago with default 2 hours ttl and they still present.
Also, how can we change TTL? We tried to pass “x-maxage” but this does not affect TTL for Rocket Loader cached files in localStorage.

1 Like

Same issue here. Rocket Loader caching js files in localStorage and exceeding the 5mb limit. I think best option for us to disable some JS scripts from being rocket loaded but what is the point then ?

Hi both,

Sorry to be late to the thread here - I just wanted to let you know Rocket Loader no longer uses localStorage caching - so you should no longer have this issue. To read a bit more about this check out our recent blogs here:

1 Like

I still see this issue happening on our website https://www.amanvida.eu/
The localStorage is not updating and I still see the old data which means the LocalStorage is being cached. When I pause Cloudflare then the new data are shown. Could you fix this please.

@pirooz Rocket Loader definitely doesn’t use local storage at all here.

If you’re seeing cached content, it will be either because the browser has it cached or Cloudflare has. To figure it out you’ll need to identify what exact HTTP request is serving “old data” and then check things like the cf-cache-status HTTP response header to understand if Cloudflare is caching it:


You can purge the cache of course: