I am having aspx which has jquery. Due to delay in loading jquery I am facing some style issues. Please can anyone tell me how to load jquery very fast.
I read a Blog post by Sam Saffron from Stackoverflow on this topic today. I didnt try out the authors tipps yet though so I cant confirm.
http://samsaffron.com/archive/2012/02/17/stop-paying-your-jquery-tax
the tl;dr; is to push jquery to the footer of the page and define a $.ready function in the header which captures all the scripts that couldnt yet be run because jquery didnt load until the actual $.ready function is loaded.
LABjs is a script loader that allows you to load scripts in a dependancy order, so you can start by loading jQuery and not block other scripts from loading. You would only block those scripts that are jQuery dependant. This may help you increase the page load speed.
LABjs (Loading And Blocking JavaScript) is an open-source (MIT license) project supported by Getify Solutions. The core purpose of LABjs is to be an all-purpose, on-demand JavaScript loader, capable of loading any JavaScript resource, from any location, into any page, at any time. Loading your scripts with LABjs reduces resource blocking during page-load, which is an easy and effective way to optimize your site's performance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With