Let's take this offline: determine internet connection
A simple way to continuously poll for internet connection
Tags: javascript, offlinefirst, pwa