2

I have component of a web app which is quite heavy in terms of the many files (mostly javascript) that it brings in.

I would like if, while in that browser session, whenever a user navigates to that route, the many various files required are not reloaded by used from memory.

This component is seperate to the main part of the app, so it is a new page load to get there, though the domain is the same.

is there a meta tag in HTML or something else that can flag to the browser to keep all of the files for this URL in memory?

kris
  • 11,868
  • 9
  • 88
  • 110
  • are you in control of the web server that serves the JavaScript files? – Davin Tryon Oct 22 '21 at 07:33
  • I probably have access, why? – kris Oct 24 '21 at 07:41
  • Add HTTP Output cache headers and the browser will cache the files. This will probably make the biggest impact if you haven’t done this already. – Davin Tryon Oct 24 '21 at 07:43
  • You could also add [preload and/or prefetch](https://stackoverflow.com/questions/52764401/what-are-the-differences-between-html-preload-and-prefetch) links. Though with many files it may not be the best of solutions – Reyno Oct 25 '21 at 06:38

0 Answers0