I need a script to check if the browser is online or not.
navigator.onLine
doesn't really tell you if the browser is online, it just tells you if there's a network.
I've seen some plugins like:
https://github.com/sindresorhus/is-online
By I need to do it without installing third party plugins.
I see that the above plugin uses this URL:
http://captive.apple.com/hotspot-detect.html
Which returns "success" if you're online.
How can I do this without installing and plugins?