248
Views
7
Comments
How to check no internet in Reactive web
Question
Application Type
Reactive

How we can get to know in reactive web if browser is not connected with internet.

2026-03-12 06-20-48
KUNDAN CHAUHAN
Champion
UserImage.jpg
Pankaj Jain

Hi KUNDAN CHAUHAN,

I am currently using navigator.online but sometime it gives me true even there is network has been off.
Looking for other alternatives.

Thanks.

UserImage.jpg
Accelance Partners

@Pankaj Jain

Have you got the solution on your question? if not then I am sharing you one discussion LINK might this help you 


Thanks,

Shriyash

UserImage.jpg
Pankaj Jain

Hi Shriyansh,

The given solution is for Mobile but problem is for reactive web. Although I am maintaining the client variable but when I use GetNetworkStatus sometimes it does not gives the accurate status of Network. 

Thanks
Pankaj.

2024-03-14 15-17-31
Rasika Modi

Hi @Pankaj Jain,

You can use Client Action named "GetNetworkStatus()" it will return true if you are online otherwise return false.

OR You can check this forge component which uses this client action as well as JavaScript with no external dependencies.

Best Regards,

Rasika

2023-10-21 19-42-11
Tousif Khan
Champion

Hello 

You can achieve this with JavaScript Asynchronously

Code Snippet

window.addEventListener("offline", (event) => {  const statusDisplay = document.getElementById("status");  statusDisplay.textContent = "OFFline";});

window.addEventListener("online", (event) => {  const statusDisplay = document.getElementById("status");  statusDisplay.textContent = "Online";});


Also we have a UI component You have to take the dependencies for OutSystems UI



I Hope This Helps

Thanks

UserImage.jpg
xavier xavier

 

 To check for no internet connectivity in a reactive web application, centurylink internet you can use JavaScript's navigator.onLine property. Implement an event listener for the online and offline events to detect connectivity changes. For a more robust approach, consider integrating periodic network requests or API checks to handle connectivity status and provide appropriate user feedback.    


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