5 ms·
A better way to defer JS
- ctietze 13y agoNicely illustrated and concise!
- stephenr 13y agoas far as I'm concerned this is just another example of Google abusing it's power in the search market. if they really cared about "best results first" they would consider the time till content is loaded for the visitor, not total time till the page loads.
- greenyoda 13y agoCan't you replace the "addEventListener" stuff with <body onload="downloadJSAtOnload()">?
- tovmeod 13y agowhat happens if you have more than one js? of course you should only have one, but I may have a js file from my server and load jquery from google cdn. in the example you can just appens the same code for each file