hoodiehq / hoodie-connection-status

:dog: connection status API for the browser
Apache License 2.0
5 stars 10 forks source link

Consider Using the Network Information API #63

Open bradley-holt opened 7 years ago

bradley-holt commented 7 years ago

Consider using the Network Information API, if available, to augment the connection status provided by hoodie-connection-status. For example, if the Network Information API is available and indicates a connection type of none then hoodie-connection-status can skip pinging the URL and immediately indicate that connection status accordingly. If the Network Information API is available and indicates a connection type other than none then hoodie-connection-status should still attempt to ping the URL and not trust that connectivity is actually available.

gr2m commented 7 years ago

This is really interesting, thanks Bradley!

One thing we have to consider is local development. My computer could be disconnected, but my app would still work as it can connect to the local server. I’m not sure if this is covered by the Network Information API as I haven’t read it yet, just want to mention this for reference