JavaScript deferring on slow internet connections

163 Views Asked by At

I hear about JavaScript deferring to increase page load times and to prioritise necessary JavaScript to load that's crucial for the page to properly function on page load and defer JavaScript that can be executed after the page load (this article suggests things like event handlers: https://varvy.com/pagespeed/defer-loading-javascript.html?utm_source=dlvr.it&utm_medium=tumblr)

What got me wondering is that although many people use a fast internet connection that can handle loading a deferred JavaScript (maybe 50-200kb files) in milliseconds, a slower connection may take a few seconds to load and therefore functionality will not be immediately available. What would be your recommendations on improving this or have I mistaken the purpose.

How can I improve JavaScript loading times for slow connections, especially with multiple libraries (jQuery, Bootstrap, etc. that could be used on a single page)?

0

There are 0 best solutions below