The purpose of this repo is to test out how the async
and defer
attributes work when doing dynamic script loading.
- Clone the repo
- Install dependencies with
npm install
- Run server with
npm start
and go here: http://localhost:3000/
There are two things to look for in the demos:
- To measure script loading, check the Dev Tools network tab.
- To measure script execution, check the Dev Tools console.
No, I don't believe so. I've tested these demos in Chrome and Firefox and defer/async don't seem to change behavior of the dynamically loaded scripts. There may be a problem with these demos or something I'm not understanding. Feedback welcome.