top | item 23117547

(no title)

pyronite | 5 years ago

This used to be a bigger deal before HTTP/2 increased the number of concurrent requests to be virtually unlimited.

Unless I'm missing something, it's "optimal" for a site to have many split files. If their JavaScript were 1 file, a change to a single character would mean the need to re-download every bit of JavaScript. Instead, with 96 files, it would mean 95 of them are still cached client-side and only 1 is need of downloading.

discuss

order

thomaslord|5 years ago

It looks to me like these scripts are asynchronously-loaded components that load only once they're needed. In this case it looks suspiciously like they're nested and each script download causes another script to be downloaded once the component renders, which would make HTTP/2 a moot point. I can even watch the requests pile up in the dev tools when they're cached, so my guess is if they dumped everything in one file (or even 10 files, just not 95) they'd get noticeably improved performance.