I'd like my web page to allow the user to add data, even when he's in offline mode and maybe store the data in local storage (cookies, html5 storage). When the user gets back online again, the page should detect the live connection and post the data to server.
Is there a mainstream way to do this? Maybe a javascript library or plugin?