1154
Views
6
Comments
Solved
[OutSystems UI] Network status detection
Question
outsystems-ui
Reactive icon
Forge asset by OutSystems

Hi,

Why is the OutSystems UI client action GetNetworkStatus using the html5 navigator.connection.type rather than navigator.online?

navigator.connection.type is according to https://caniuse.com/#search=navigator.connection not available for ios. https://developer.mozilla.org/en-US/docs/Web/API/Navigator/connection mentions also that this is experimental technology.

navigator.online on the other hand is generally available https://caniuse.com/#search=navigator.online, and not experimental https://developer.mozilla.org/en-US/docs/Web/API/NavigatorOnLine/onLine.


2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP
Solution

Hi Sylber,

I checked the implementation of the GetNetworkStatus, and since I posted my question this has already been changed/fixed:

Regards,

Daniel

2020-04-21 17-26-46
Sylber Gashaj

Daniël Kuhlmann wrote:

Hi Sylber,

I checked the implementation of the GetNetworkStatus, and since I posted my question this has already been changed/fixed:

Regards,

Daniel

Hi Daniel,


Thanks for the quick response! According the notes in https://caniuse.com/#search=navigator.online,  it says the following: - "online" does not always mean connection to the internet, it can also just mean connection to some network.-


So we shouldn't actually use this to check if their mobile application is connected to the internet... Because in the Javascript of GetNetworkStatus client action the following is commented:" Uses navigator to check if device is online".


Regards,

Sylber


2022-03-01 15-42-44
Thiago Mari
Champion

Daniël Kuhlmann wrote:

Hi,

Why is the OutSystems UI client action GetNetworkStatus using the html5 navigator.connection.type rather than navigator.online?

navigator.connection.type is according to https://caniuse.com/#search=navigator.connection not available for ios. https://developer.mozilla.org/en-US/docs/Web/API/Navigator/connection mentions also that this is experimental technology.

navigator.online on the other hand is generally available https://caniuse.com/#search=navigator.online, and not experimental https://developer.mozilla.org/en-US/docs/Web/API/NavigatorOnLine/onLine.


Hi,


I think is because one is more old than other? And about IOS devices, they adapt any systems, so they guarantee the device with IOS works too.


2020-04-21 17-26-46
Sylber Gashaj

Daniël Kuhlmann wrote:

Hi,

Why is the OutSystems UI client action GetNetworkStatus using the html5 navigator.connection.type rather than navigator.online?

navigator.connection.type is according to https://caniuse.com/#search=navigator.connection not available for ios. https://developer.mozilla.org/en-US/docs/Web/API/Navigator/connection mentions also that this is experimental technology.

navigator.online on the other hand is generally available https://caniuse.com/#search=navigator.online, and not experimental https://developer.mozilla.org/en-US/docs/Web/API/NavigatorOnLine/onLine.


Hi,


Is that a reason that GetNetworkStatus client action does not check whether there is actually an internet connection?


Kind Regards,

Sylber


2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP
Solution

Hi Sylber,

I checked the implementation of the GetNetworkStatus, and since I posted my question this has already been changed/fixed:

Regards,

Daniel

2020-04-21 17-26-46
Sylber Gashaj

Daniël Kuhlmann wrote:

Hi Sylber,

I checked the implementation of the GetNetworkStatus, and since I posted my question this has already been changed/fixed:

Regards,

Daniel

Hi Daniel,


Thanks for the quick response! According the notes in https://caniuse.com/#search=navigator.online,  it says the following: - "online" does not always mean connection to the internet, it can also just mean connection to some network.-


So we shouldn't actually use this to check if their mobile application is connected to the internet... Because in the Javascript of GetNetworkStatus client action the following is commented:" Uses navigator to check if device is online".


Regards,

Sylber


2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Hi Sylber,

For better offline detection and handling, have a look at 

https://www.outsystems.com/forge/component-overview/3303/offlinedetection

Regards,

Daniel

2025-09-04 06-33-37
Nikhil___Vijay

navigator.connection.type is according to https://caniuse.com/#search=navigator.connection not available for ios. 

Now it is available for ios 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.