Loading the Jquery Library
Author |
Message |
nonamedude
|
Posted: Thu Nov 03, 2011 7:29 pm Post subject: Loading the Jquery Library |
|
|
Hey guys,
I am currently using Jquery for my php projects and I was just wondering about how the library is loaded. Right now I have the entire library which is around 240kb. I am curious to know that when a webpage load a jquery function, does it load the entire library meaning downloading the whole 240kb or does it only download the function it needs?
If it doesn't, is there a way to make it so that it loads the necessary functions?
Thanks! |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: Thu Nov 03, 2011 7:44 pm Post subject: RE:Loading the Jquery Library |
|
|
The entire library is loaded before a call is made, there is only one download request.
Also, the latest version of jQuery is only 94kb (jquery-1.7.min.js); and if it's hosted on a common 3rd party host (in specific Google Libraries API), there's some chance that the users would already have the resource downloaded and cached before hitting your website for the very first time). |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
nonamedude
|
Posted: Thu Nov 03, 2011 10:35 pm Post subject: Re: Loading the Jquery Library |
|
|
O i see, thats great. I was worried that they would have to download it everytime. Thanks for help!. Ill get the latest version |
|
|
|
|
|
|
|