Offline.js
Automatically display online and offline indication to your users
...It captures AJAX requests which were made while the connection was down, and remakes them when it's back up, so your app reacts perfectly. It has a number of beautiful themes and requires no configuration. The easiest way to add Offline to your site is with Eager. Improve the experience of your app when your users lose connection. Include the javascript, one of the themes, and one of the languages on your site. You're done! To use only the JavaScript API without a UI indicator, simply leave out the CSS file. If you'd like to get a peek at how it looks on your site, disconnect your internet, or try out the simulator. ...