

Bootup.js - cache and load static files from local storage - quan
https://github.com/TradeMe/bootup.js

======
ushi
Paul Irish made something similar. A jQuery plugin that used localStorage to
cache ajax responses.

<https://github.com/paulirish/jquery-ajax-localstorage-cache>

------
le_isms
Please correct me if I'm wrong, but isn't this what the browser cache is for?

~~~
dkordik
Yeah, at least for the caching part, it seems like you should let that be the
browser's responsibility, and set up Expires headers/etc appropriately. But
what about the offline viewing use case? What are some good solutions to that
these days?

~~~
willtheperson
Check out this article for a great explanation of using the cache manifest
[http://www.alistapart.com/articles/application-cache-is-a-
do...](http://www.alistapart.com/articles/application-cache-is-a-douchebag/)

There are quirks, sure, but it's actually designed for asset caching, unlike
localStorage

~~~
lylepstein
I think quirks is understating it. The problem with appcache is that if you
run into many of those gotchas the article lays out, it's often difficult to
resolve them for previous users. For example, say you accidentally give the
manifest a far-future expires (gotcha #4); users with the forever-cached
appcache need to manually clear their cache in order to get things working
again. And, depending on how you've structured your app, even _explaining_ to
users that they need to clear their cache could be difficult...

You really need to plan ahead carefully if you're using the appcache, which I
think changes the definition from "a nice tool, with some quirks" to "a
complicated feature that you have to understand completely before
implementing."

With that in mind, I think bootup.js is an interesting alternative if you can
work around its other deficiencies.

------
nickporter
Warning, LGPL licensed.

~~~
dkroy
Yeah, it could have been the best project ever, but the license is the first
thing I look at. So I saw that then closed the page.

~~~
drivebyacct2
What are all of the implications of LGPL when use with browser javascript
anyway o_0

------
itsnotvalid
Looks like an open-source version of Cloudflare's Rocket Loader, but without
the source file concatenation. Still, we should produce something open-source
for these.

------
aioprisan
There is also a size limit of 5MB that you should be aware of.

~~~
solox3
That is the default, not the limit. In all modern browsers, this limit is
either 5MB, or set to prompt when the web page requests any larger.

~~~
city41
For localStorage? I can't find any information on that. I know this is the
case for Web SQL databases. But as far as I understand, localStorage is hard
coded with no chance of expansion. To make matters worse, localStorage uses
strings, effectively cutting your storage a good deal.

