views:

361

answers:

5

Our website is an AJAX website that makes no page requests after the initial start up of our website. Information is communicated with the server through XMLHttpRequests.

Our website allows users to work online and offline without a connection during a user session. When a connection is detected our website "synchronizes" with the server.

Our problem is that if the internet browser running our website crashes while the user has no internet connection the user cant begin working with our website until she/he gets an internet connection back.

Is it possible to have the browser cache the initial startup page (index.html) along with the other website resources and have the browser use the cached version of the startup page when there is no internet connection present?

A: 

This really isn't feasible. You could look at Smart client technology if you truly need to work offline. That'll be a lot of work though depending on the size of your application.

Neil Barnwell
+5  A: 

(Google)Gears is exactly about this.

Javier
+1  A: 

Not with any technology built into common web browsers.

You can achieve this using Google Gears, but that requires the user to install a plugin and grant permission to your website to use it. Google Docs and Wordpress are examples of web applications that use this.

David Dorward
A: 

Technically it is possible. Google Gears does it. So Google can now save your entire gmail app on your local machine and operate without an internet connection.

Vincent Ramdhanie
A: 

You can use HTML5 databases, check the iPhone version of gmail for offline functionality without a plugin.

Rich Bradshaw
unfortunately, HTML5 does nothing about getting the initial page locally.
Javier