How to really know if your webapp is online
Unsurprisingly, it returns
true if you're online, and
false if you aren't. In addition, the
window.onoffline events notify you whenever that value changes.
If it was quite this easy, I wouldn't be sitting here writing a blog post about it. In fact, if we look at the spec, we find the following...