What's are the problem with normal scripts ?
- Browser must halt parsing the html until the scripts is downloaded and executed (since the script might call document.write(...) or define global variable that are later scripts depend on )
- Any images and style sheets that follow the script tag don't start downloading and executing.
After the page has rendered , all defer scripts are executed in the same order that they were declared. Not all browser implement defer the same way .
The purpose of defer is to indicate that a script won't changing the structre of the page as it executes
No comments
Post a Comment