Would async script loaders like LABjs or $script.js prove beneficial, neutral, or negative if already using a CDN supporting SPDY?
- I'm going to use a full-site CDN with SPDY, for example Cloudflare
- I've read Script-injected "async scripts" considered harmful but thanks to jQuery dependencies I need to control execution order.
- I want to keep dependencies as unbundled as possible
i.e. I've got a series of JS scripts where <script src=
would work fine and <script async src=
would not. I don't want sync because it would be blocking. And defer
is too flaky to consider.
Given the above, I would use a script loader without second thought if it weren't for the uncertainty of SPDY. I probably just need to know whether the approach used by these scripts still gets the same SPDY benefits (pipelining, compression, etc) as "regular" approaches?
Another way of framing the question is: what would be the impact of switching from synchronous script loading with SPDY CDN to using async script loaders with SPDY CDN?