Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

decent html5 offline storage and caching examples

Tags:

html

jquery

I'm keen to test out html offline storage and caching with a view to developing a prototype to show off the offline web application capabilities of html5.

I've found some webkit-specific samples, but I'm battling to find any decent code samples that even work at all in Firefox 3.6

For a sample, I'd be happy with something that works with the following:

  • Our company uses jquery extensively so I'd prefer samples that use that library or pure javascript.
  • It should at least work on firefox (3.6+ is fine)

Can anyone point me to some links that provide some guidance and code samples?

like image 422
Nils Avatar asked Feb 05 '10 06:02

Nils


4 Answers

See http://hacks.mozilla.org/?s=localStorage

Firefox doesn't support SQL database API, if that's what you're looking for.

like image 72
Nickolay Avatar answered Sep 22 '22 02:09

Nickolay


I found this example, it is the simplest / best thing I have seen with localstorage. It only demonstrates the local (persistent) storage, not database storage. Also, if you want session storage, just change "localStorage" to sessionStorage"

The javascript couldn't be any simpler I think.

w3.org example

And yes, it works fine with FF (at least for me.)

like image 40
Paul Hoffer Avatar answered Sep 19 '22 02:09

Paul Hoffer


I recommend looking at the CSS Ninja's Font Dragr demonstration which, although primarily designed to demonstrate the File API for HTML5 using Firefox, also makes use of Offline Storage.

If nothing else, this guy knows his stuff and can suggest good examples.

like image 40
Phil.Wheeler Avatar answered Sep 19 '22 02:09

Phil.Wheeler


I've found this pretty good page of html5 demos recently so thought I'd post it back here.

html5demos.com

Edit - another link that may help:

From the Google Chrome development team comes HTML5rocks, a site to feature and educate webmasters on the awesome new features of HTML5.

www.html5rocks.com

Edit #2 - this is one of the best articles I've come across yet:

wrapping things nicely with html5 local storage

like image 34
Nils Avatar answered Sep 23 '22 02:09

Nils