1

Probably not. But still would be nice to have it. Kinda hard to believe that modern standards do not support it.

Update: I would like to load scripts concurrently as opposed to the asynchronous scripts execution. So that if there are 10 scripts to load (9 small, 1 big) - in that case the big script won't "stuck" the download of the smaller ones.

Update2: I am loading the scripts by adding the script DOM element via javascript.

3
  • Are you talking about downloading scripts or about single-threaded interpreters? Commented Jul 2, 2012 at 7:40
  • Can you explain what do you want to achieve by this? Commented Jul 2, 2012 at 7:40
  • thanks for your questions. kindly see my updates. Commented Jul 2, 2012 at 7:56

2 Answers 2

3

In html5, you have async attribute.

HTML5′s async Script Attribute

Sign up to request clarification or add additional context in comments.

Comments

0

If you're referencing them via <script> tags in the delivered HTML, then it's up to the user agent to decide how to load this resource, but every modern browser is able to fetch multiple resources concurrently. Interestingly they may choose not to fetch multiple Javascript files at once - this Google best practices document alludes to why, though the exact behaviour will depend on the browser,

If you're programmatically loading them via logic in other Javascript files, then probably not - Javascript is inherently single-threaded, so no two scripts could execute at once in order to fire off the requests.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.