views:

52

answers:

1

Thats pretty much it. Looking for best practice with mobile jQuery caching. Thanks for the help in advance.

+4  A: 

There's no need really, with the proper caching headers the browser will already be caching the library. This isn't HTML5 specific at all, cache headers have been around for quite some time, you can configure them on your site (see the link for details) or include the jQuery script from a CDN, for example:

Both of these have the cache headers set appropriately already.

Nick Craver
The need for this comes into play when dealing with mobile devices. For example the iPhone can only cache 25K and the jQuery library is pushing 24K...that's why I want to store it. http://www.yuiblog.com/blog/2010/06/28/mobile-browser-cache-limits/Am I not right for thinking storing it would be beneficial for a mobile web app?
Brad
@Brad - Actually those limits are the *uncompressed* size, so jQuery already violates that, or did. If you read further down you see the iOS 4's cache limit is over 100KB for a simple component, so this isn't the issue it used to be. Also jQuery's mobile support being around the corner may change things even more. I would read the updated article: http://www.yuiblog.com/blog/2010/07/12/mobile-browser-cache-limits-revisited/ it's *much* more on point in addressing your concerns :)
Nick Craver
Thanks for the help. It is greatly appreciated all.-B
Brad