Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

offline mobile website

Tags:

mobile

web

Is it possible to have a mobile website that can still function if there's no internet connection?

The user should still be able to use the website (if he has visited that page before), see the data (that was loaded before), add new stuff (cache locally). When internet connection comes back online, all changed local data should be pushed online.

This should be a complete webbased solution, not a native app.

like image 802
Aipie Avatar asked Aug 24 '11 16:08

Aipie


2 Answers

You should have a look at HTML5 offline storage, see http://diveintohtml5.ep.io/offline.html and the Offline Web Applications spec as a start. There are also quite a few posts here on SO.

like image 188
ldg Avatar answered Oct 28 '22 00:10

ldg


Bookmarklets work when a user is offline. The trick with a bookmarklet is that it's entirely self contained javascript wrapped up in such a way that it can live within the bookmark itself. E.g. a javacsript: URL. You can also have a data: URL as a bookmark, which could be a complete HTML page. Usually these are base64 encoded with a mime type.

Probably what I'd do would be have a small base page as data:text/html,base64 which contained whatever offline content you cared about, but periodically tried to bootstrap the rest of the "real" content from wherever you host it.

like image 35
Flexo Avatar answered Oct 28 '22 01:10

Flexo