Techtonica / keyboard-shortcuts-practice

https://techtonica.github.io/keyboard-shortcuts-practice/
26 stars 56 forks source link

Add 'defer' attributes to script tags in index.ejs #92

Closed vegetabill closed 3 years ago

vegetabill commented 3 years ago

Having all the external JavaScript loaded before the HTML means that on a slow connection the page will not display until all of the resources are downloaded, but we don't really need the JavaScript to be able to render the keyboard, only to start the welcome animation.

For each of the <script> tags at the top of the HTML body, please add a defer attribute to them.

After making this change, please test that the page still works correctly. You can simulate slow loading times to help with Chrome Dev Tools throttling.

For more background context, see async vs defer.

swarna-gopalan commented 3 years ago

@vegetabill - I can take this one as part of GraceHopperOSD

racheltl commented 3 years ago

I'm interested in working on this as well!