Ask HN: Performance hit for jQuery Download?
I'm using JQuery for the first time on a new site. I love it, but I had some worries.
I really want my site to be snappy, but it seems that downloading JQuery, even when minified, can cause a decent performance hit.
Is this worry justified? If so, is there anything I can do? Can something like GWT do the same basic stuff that JQuery does (and thus reap the performance benefits from less code to DL)?
Also, if this is a problem, and since I see a lot of sites using jQuery these days, why can't the browsers bundle the framework in their browser so the user doesn't have to download it each HTTP hit (of course, using the bundled framework would be optional)?
Thank you.
4 comments
[ 3.5 ms ] story [ 18.4 ms ] threadhttp://code.google.com/apis/ajaxlibs/
Using Google's version also means that it will only be cached once between all the sites that use it. This is similar to what you're talking about with bundling it in the browser,
<FilesMatch "\.(jpg|jpeg|png|gif|js|css)$"> Header set Cache-Control "public" Header set Expires "26 June 2210 20:00:00 GMT" </FilesMatch>
Read more here http://encosia.com/2008/12/10/3-reasons-why-you-should-let-g...