tags:

views:

10

answers:

1

in Ms-Ajax

suppose iam downloading 3 files , no dependencies have been defined b/w them

Sys.loadScripts(['file1.js',file2.js',file3.js']);

a> in which order these files will be loaded??

b> in which order these files will be made available to requesting page??

A: 

From what I can discover I think the answer to both questions is "Indeterminate". The loadScripts function will launch parallel script loads so in theory the smallest script available over the best bandwidth will complete first.

It's not absolutely clear but I also suspect this is a blocking call, i.e. it will not return until all scripts are loaded. To be honest it would be pretty useless if it did as you'd never know when in your page the scripts were available.

Lazarus
http://www.asp.net/ajaxlibrary/HOW%20TO%20Load%20a%20Custom%20Script.ashx, as per this link files are loaded in parallel, but i tested it in firebug and chrome, both are loading files in sequential order. i dont know why!!
Praveen Prasad

related questions