Sridhar Kuppalli wrote on 10/14/2008 11:32 AM: > Which of these are better for faster loading? > > jquery-1.2.6.min.js (size-54kb) > > jquery-1.2.6.pack.js (size-30kb) >
The min version. Even better, enable gzip compression at the server. And even better still, use the Expires header and set it to expire in a year -- that will cause the browser to cache the file for a year, so it won't have to download another version for an entire year (assuming the user doesn't clear their cache). > One more strange thing I have observed is when I include > http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js > > the loading time is very less compared to the same file inclusion in my > production site.(http://mysite.com/js/ jquery-1.2.6.min.js) > > What is the reason for this? Most likely your server isn't telling the browser to cache the file and Google is. - Bil