By reducing the number of requests, you will speed up your mobile app or website.
To speed up the loading of resources, multiple JS files can be combined into a single file and multiple CSS files can be combined into a single file. This can be done manually or programmatically.
However, combining files can create some issues:
- Combined files can cause namespace conflicts with other scripts and create unpredictable bugs.
- Combined files can become large and unwieldy.
- One change to any part of a combined file invalidates the whole file in the browser's cache and requires a slow re-download.
Best Practice Recommendation