The final purpose of my script is to send a warning email when the number of connected user exceeds certain limit, this usually happens when the inactive process stop working(every week)!
When you see poor compression and the many HTTP round trips problems, the next most obvious thing might be to concatenate absolutely all of your JS together. Diagramatically, this would look like this:
While this does offer better compression and fewer HTTP round trips, we have two new problems. The first is that we’re now downloading potentially WAY more stuff on a page than we actually need.
For instance, to load up the homepage of the site, you now need to download all of the source of react.js and video-player.js even though the homepage uses none of that!