javascript - Parallel downloading of JS files in HTML -


i have html file looks this

 <html>     <head>         <script src="1.js"></script>         <script src="2.js"></script>         ...         <script src="200.js"></script>     </head>  </html> 

1.js contains 1 line

window.performance.setresourcetimingbuffersize(250); 

by default, resource buffer size in chrome 150.

but, when see resources using resource timing api, length of resources not 200. keeps varying randomly between 150 200.

i know why happening. because, chrome tries download resources in parallel , hence, registers resources in resource timing api.

the snippet in 1.js

window.performance.setresourcetimingbuffersize(250); 

actually gets executed bit later. hence, more resources added resource timing buffer. but, not of them added.

is there way stop parallel download of resources? download first resource first, let code execute , resume downloading of remaining resources in parallel.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -