Monday, 17 July 2023

Js window offline event not fired on Android phones, (not in Android Browser or Chrome) and navigator.onLine Return always true

Js window offline event suddenly stop firing on Android phones, not in Android Browser, not in Chrome! The following code for example stopped working:

 window.addEventListener('offline', function (e) {
        alert('offline');
    });

And

navigator.onLine

Return true!

Does anyone have any idea why?

Check it yourself on android: https://codepen.io/Zvi-Redler/pen/JjeMLWR

Or an idea how to get around the problem in the meantime?

(Our QA team found, checked on several devices, we don't know about a special update. I do airplane mode, for sure there is no network and in the past it worked.)



from Js window offline event not fired on Android phones, (not in Android Browser or Chrome) and navigator.onLine Return always true

No comments:

Post a Comment