3 ms·
It depends on what you're working on and how often it changes. If you have 8 JS files that are one single script in production, every time you change anything i
by Hovertruck 16y ago
It depends on what you're working on and how often it changes. If you have 8 JS files that are one single script in production, every time you change anything in any script, the user has to re-download the whole thing. If the scripts remain separate in production a change to one does not invalidate the cached versions of the others, so they don't have to be re-downloaded.
Again it depends on the sizes of the files and how often they change, but ideally you could define your core JS that would be loaded first, and then asynchronously load the rest of the JS that might not be needed, or at least not be needed on the initial page load.
- Semiapies 16y agoThanks.