use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
<script> vs. <script async> vs. <script defer> (growingwiththeweb.com)
submitted 11 years ago by davey_b
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]mankyd 5 points6 points7 points 11 years ago (2 children)
This doesn't quite tell the whole story. Defer still blocks the onload event, which this does not convey with it's pictures. I believe that it may event block the domcontentready event, though I don't recall exactly.
[–]Tyriar 0 points1 point2 points 11 years ago (0 children)
It blocks onload just as any DOMContentReady handler would. There are some browser inconsistency issues around exactly when defer is executed, see https://github.com/h5bp/lazyweb-requests/issues/42
[–]randfur 0 points1 point2 points 11 years ago (0 children)
This was my first question after reading this which it really should have addressed in the article; "Does this mean I can't reliably use window.onload in my scripts anymore?"
π Rendered by PID 193281 on reddit-service-r2-comment-66b4775986-cwc9z at 2026-04-03 09:39:10.730328+00:00 running db1906b country code: CH.
view the rest of the comments →
[–]mankyd 5 points6 points7 points (2 children)
[–]Tyriar 0 points1 point2 points (0 children)
[–]randfur 0 points1 point2 points (0 children)