I would really like to deploy my project using jquery but afraid it may annoy the dail up users. So is it possible to integrate JQuery within the browser itself?
+10
A:
jQuery is a 19K download (minified and gzipped), which is a few seconds even on dialup. I wouldn't worry about it.
The only thing you should do is correctly version it so you only download it when it changes. You can do that by simply getting it from the Google AJAX Libraries API .
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
What you should be aware of is the best practice for static content that is delivered from your site should:
- Have a far-futures Expires HTTP header to force the client to cache it;
- Version it somehow so when you change the version number the client will re-download it; and
- Gzip everything.
The jQuery from Google is already versioned with the jQuery version number. With your own content it's common to, say, use the last modified time of the file as part of the URL, eg:
<img src="/images/logo.gif?1233748877">
cletus
2009-12-16 03:52:59
cletus, 17k, really? I just looked and my jquery-1.3.2.min.js is 65k?? What gives?
Cheeso
2009-12-16 05:25:43
I just tickled the link you gave from googleapis.com, 56k for jquery.min.js.
Cheeso
2009-12-16 05:26:57
The 19k (yes, 19k not 17k) claimed on the jQuery site assumes the connection will gzip the file's contents before sending it.
R. Bemrose
2009-12-16 05:31:36