I don’t think it’s such a good idea if you plan to return visitors - and I assume that it is if you are developing a web application. Since every time one of your js files changes, you get your users to upload a huge file.
When your user first enters your application, they often quite forgive if the load time is a little longer. If you show them a good introduction, they will read and / or watch something while scripts and various assets are loading. But if they have to wait for your huge script to load every time they return, because that's all or nothing, this will be considered bad UX.
If you don’t need all the 20-30 files first, when the user loads your application, use the script loader to load them in the background.
If you need these 20-30 files, try collecting them into 10 or so files, trying to aggregate those that are most likely to be updated together.
As for gzip compression, your web server should handle this.
source share