Question

I need to build an application to run inside a web browser that works offline (whitout any internet connection) and store data in a way that I can after with internet connection be able to upload these data to a server.

for example for example an HTML form

<html>

<body>

    <form>

        Name: <input type="text" name="name" /><br />
        E-mail: <input type="text" name="email" /><br />

        <input type="submit" name="save" />
    </form>

</body>

so when I submit this form the browser saves the data somewhere and when I be connected I can upload it to a server...

do anybody knows a way to do that??

Was it helpful?

Solution

Use local storage to save offline data. You can use AJAX (jQuery makes it easy: see here) to try to post the local storage data to your server. You may want to set an interval to post to the server.

OTHER TIPS

Saving to local storage (in browsers that support it) and then syncing with a web server is how I would do it.

The real problem here is that browsers were not really build for that so you'll need to find some clever solutions and also would only work in modern browsers.

A native application might be a better way to go.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top