News for hackers. Stuff that matters.
Re:Managing Async Dependencies with JavaScript by bfred_it on Saturday May 20, 2017 @07:36AM (#14381934)
If your intent is to load scripts asynchronously and keep their order, just use `<script defer>`. From what I see, you only ever need something like `fetch-inject` if you also want to load stylesheets OR if you want a load callback.

I've been using `defer` exclusively ever since I read this: https://calendar.perfplanet.com/2016/prefer-defer-over-async...

Re:Managing Async Dependencies with JavaScript by jhabdas on Sunday May 21, 2017 @08:58AM (#14387082)
The `defer` attribute waits until the document is finished parsing. Async doesn't wait.
Re:Managing Async Dependencies with JavaScript by jayflux on Saturday May 20, 2017 @10:29AM (#14382525)
Yes this is true, defer should pull down scripts asynchronously, but execute them in inserted order. If it's just scripts that's all you need to do, you don't need this.