Offline.js is a library to automatically alert your users when they’ve lost internet connectivity, like Gmail.
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.
I worked on a project and used the offline.js library. Let me say this the library it’s small (you can even remove code if you are not using the xhr request and use only the image request) doing so you can make it even smaller.
Uses different types of CSS themes, and of course you can style your own. But the library itself works out of the box.
License: License Free