I have been using javascript for some while now and recently began using jquery which I will admit I am fan of.
<script type='text/javascript' src='../locationOfJquery/jquery.js'></script>
allows use of the library in the script tags on that page. What I want to know is if just including the script tags slows down page load time any, even if there is no jquery code on the page, and also if there are any other major downsides to using jquery
To further answer smaller questions you had:
Numbers:
For example on Chrome when loading the Stackoverflow website, requesting the jQuery library from the Google CDN, the results were:
This is all relative of course. I bet when you loaded this page you did not notice any lag because the entire page took about 630ms to load.
The client will have to download the jQuery script (which is quite small). To further optimize you can just use hosted "Content Delivery Network" versions from Google or Microsoft. Also remember to use the minified version which downloads faster.
This article states the reasons why.
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