Hello,
I’m looking for a way to detect working internet access for my add-on background script. I need this to prevent execution of some scheduled tasks that creates thumbnails of user defined pages.
Being off-line is actually happening quite often, mostly when PC is waking up from sleep and the network is not fully initialized. I could solve this use case with a wake-up detector code but that would solve only this one use-case and would like to have a proper solution.
I’ve found window.navigator.onLine
but it doesn’t work at all even if I disable my whole network adapter.
Is there a better way? Maybe some simple “ping” AJAX to google.com? (something that would be allowed by add-on Policies).