??Sumanai wrote:Any additional logic only slows the page load relatively literate direct insert scripts at the end of <body>
JavaScript dependency injection
- callumacrae
- Former Team Member
- Posts: 1046
- Joined: Tue Apr 27, 2010 9:37 am
- Location: England
- Contact:
Re: JavaScript dependency injection
Re: JavaScript dependency injection
callumacrae, what question? In my opinion it is obvious that the script connects other scripts will generally be run slower than the direct insertion of these scripts. Adding additional logic slow page rendering in the browser.
Sorry for my English.
Re: JavaScript dependency injection
Not really true. This is about going asynchronous and modular. So only what is needed is loaded, and loaded in parallel. That means, more efficient loading.Sumanai wrote:callumacrae, what question? In my opinion it is obvious that the script connects other scripts will generally be run slower than the direct insertion of these scripts. Adding additional logic slow page rendering in the browser.
Has an irascible disposition.
Re: JavaScript dependency injection
Set tag attribute <script> async very simple and it does not require any additional scripts.VSE wrote:asynchronous
After splitting the javascript into modules they will be more (obviously), and when you first load the browser will execute multiple queries.VSE wrote:modular
Speed subsequent loads, while taking scripts from the cache will not differ.
Where is the advantage?
Sorry for my English.
Re: JavaScript dependency injection
Well I want you to know Callum that I was pretty happy with my blazing fast 1.5Mbps DSL connection... until you said 1MB/s is slow (8Mbps).callumacrae wrote:And that isn't how the browser downloads documents at all—or, for that matter, how anything is downloaded over TCP. If you had a 1 MB/s connection (which is pretty slow), it'll take a lot longer than a second to download a megabyte.
-Jonah
- callumacrae
- Former Team Member
- Posts: 1046
- Joined: Tue Apr 27, 2010 9:37 am
- Location: England
- Contact:
Re: JavaScript dependency injection
Have you ever actually used a script loader, or are you guessing? I'd suggest you try one out—it might help you better understand what they do.Sumanai wrote:Set tag attribute <script> async very simple and it does not require any additional scripts.VSE wrote:asynchronous
After splitting the javascript into modules they will be more (obviously), and when you first load the browser will execute multiple queries.VSE wrote:modular
Speed subsequent loads, while taking scripts from the cache will not differ.
Where is the advantage?