Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8450047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:52:00+00:00 2026-06-10T10:52:00+00:00

When I did some test cases with LABjs,I encountered some problems,here comes the code:

  • 0

When I did some test cases with LABjs,I encountered some problems,here comes the code:

$LAB.script('http://code.jquery.com/jquery-1.8.0.min.js')
    .script('http://id.qq.com/js/10001/simple.js');

according to the API description, there is no guaranteed for the excution order of jquery-1.8.0.min.js and simple.js. I blocked jquery-1.8.0.min.js with fiddler,what i boserverd was:

  1. It works just all right in IE8, when simple.js finished downloading,it excuted right at once.
  2. In chrome 20, simple.js never excuted until jquery-1.8.0.min.js finished downloading and excuted.

Is it a bug ?

Then I did another test in chrome 20,here comes the code:

var script = document.createElement('script');
script.type = 'text/cache';
script.src = 'http://code.jquery.com/jquery-1.8.0.min.js';
document.head.appendChild(script);

jquery-1.8.0.min.js didn’t start downloading when I ran this code , is it the problem?

here is the api description:http://labjs.com/documentation.php#script

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T10:52:02+00:00Added an answer on June 10, 2026 at 10:52 am

    You have two questions, so let me take them separately:

    1. Why isn’t “simple.js” running if “jquery.js” is blocked, in Chrome 20, but works as expected in IE8?

      Ummmm, I don’t fully know why that would be. It’s probably not a bug in LABjs, but it might be a quirk of Chrome. It should, according to the spec, run in ASAP order, meaning “simple.js” should not be waiting on “jquery.js”. The only other explanation besides the browser having a quirk/bug would be if somewhere in your code you have set $LAB.setGlobalDefaults({AlwaysPreserveOrder:true}), as that will cause the blocking behavior just like if there was a wait() in between the two.

      Just for the sake of ruling that out, can you change the snippet to be $LAB.setOptions({AlwaysPreserveOrder:false}).script(...)... to explicitly disable that automatic wait() behavior, just in case?

    2. Webkit (roughly Chrome 11’ish) stopped fetching script elements if their type attribute wasn’t a recognized valid type. So “text/cache” should be ignored and fail to start downloading in Chrome 20 (and all other browsers, for that matter, except IE <= 9), because that’s what the spec says to do. Where you see that technique in LABjs’ source code, it’s actually used as a last-case fallback, where it applies ONLY to those really old/legacy webkit browsers, because it DID work way back then.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some old Haskell code that includes QuickCheck test cases. Newer versions of
Did some searches here & on the 'net and haven't found a good answer
I already did some search here on SO, on this , this , this
On my last project, I created some test cases through Selenium , then automated
I'm running gcov over some C code with a switch statement. I've written test
This question provides more clarity on the problem described here . I did some
Did some googling and couldn't find a clear answer on this. My assumption is
I did some research and found that the only way to vertically center a
I did some all day learning and I figured out how to add rows
I did some work on a project on one machine, then pushed to github

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.