Cache-manifest.js file size

We realized that our __layer0__/cache-manifest.js file size is 2mb, which is impacting page speed. What for layer0 use this file? Is there any option to get rid of it?

Our investigation showed that layer0/rum is fetching this file(cache-manifest.js). We are removing RUM from our app until this can be resolved.

Do you have an extremely large router with cache configurations? This file is used by the service worker to determine which routes can be prefetched and cached within the browser.

Why do you suspect RUM to be involved? cache-manifest.js is used by the prefetcher and not RUM (What is cache-manifest.js).

I think RUM does use cache-manifest.js, as per Layer0 Documentation - Core Web Vitals, the script tag that loads the file, in turn loads cache-manifest.js.

Hmm. But if RUM is turned off then cache-manifest isn’t fetched?

RUM uses cache-manifest for sending the route id to analytics. Since we have a lot of routes, the file is really huge. If possible, we would like to have an option to send plain URL from window.location instead, to avoid downloading this file.

Could be a sidebar:
But the question also is why does it try loading cache-manifest.js? All deployments with Layer0 RUM aren’t making use of Layer0 Platform, which then shouldn’t be requesting cache-manifest as there’s no routes/cache-manifest for them I think.

In case people are still wondering about this…

I’ve currently got an app that is 44MB of resources successfully downloaded and tested offline on Safari(6.1), Chrome(31), Firefox(26), iPad (ios7) and iPhone (ios6).

Only problem I have discovered is when you add the app to the home screen. I have decided this is because the app is too big and needs to expand the cache however there is no handling for this and it just ends with an error. Work around → reload the app. Close, open, and resave cache = works.