Skip to content

javascript execution

January 7, 2010

The execution is top down and single threaded. Javascript may look multi-threaded, but the fact is that Javascript is single threaded. This is why when loading external javascript file, the parsing of the main HTML page is suspended. However, the CSS files can be download simultaneously because CSS rules are always being applied – meaning to say elements are always repainted with the freshest CSS rules defined – thus making it unblocking.

Download asynchronous may be applied to media components, such as external CSS stylesheets, images, flash and so on. Javascript execution is single threaded, thus only after the execution of a <script> will the next be executed.

SO – Discussion Link

Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: