How we can get to know in reactive web if browser is not connected with internet.
Hi,
please visit on this disscussion :
https://www.outsystems.com/forums/discussion/56001/network-status-detection/
Thanks
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.
@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
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.
ThanksPankaj.
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
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
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.