View Single Post
  #3 (permalink)  
Old October 4th, 2016, 10:45 PM
brsastre brsastre is offline
Registered User
Points: 26, Level: 1
Points: 26, Level: 1 Points: 26, Level: 1 Points: 26, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2016
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Deferred attribute order

From the book:

"The HTML5 specification indicates that scripts will be executed in the order in which they appear, so the first deferred script executes before the second deferred script, and both will execute before the DOMContentLoaded event (see Chapter 13 for more information). In reality, though, deferred scripts don’t always execute in order or before the DOMContentLoaded event, so it’s best to include just one when possible."

So... will the first deferred script executes before, or after the second deferred script?

What situations could lead to the second deferred script get executed before the first deferred script ?

Is there a way to be completely sure that the scripts will run in the same order as they appear then?

Thank you!
Reply With Quote