title: Cordova, how to detect offline accurately
body: <p>I am looking for a way to detect </p>
  
  <ol>
  <li><p>Phone is offline, no data or wifi</p></li>
  <li><p>Phone is online, but is behind a router that blocks access without sign in (like hotels, free wifi hotspots, etc.)</p></li>
  <li><p>Phone is online, but the server is offline</p></li>
  </ol>
  
  <p>Number 1 is easy using cordova-network-information
  Number 2 and 3 are more difficult.  I can send an ajax to our server as a heartbeat to test it, but that can't tell the difference between situation 2 and 3.</p>
  
  <p>What's a way I could test for situation 2 and 3 accurately?</p>
  
  <p>My first thought was to ajax something on google to check situation 2, and if 2 passes, then check 3. Does that sound like a good idea?</p>
  
  <p>Thanks</p>