We have a browser application (SaaS) in which we would like to notify the user in case of an Internet connection or loss of connection to the server. Gmail does it very well, as soon as I disconnect the Internet cable or disconnect the network traffic, it immediately says that it cannot reach the server and gives me an account for retrying.
What is the best way to implement something like this? I would like the client browser to issue AJAX requests to the application server every second or have a separate server that simply reports "live". Scalability will be a problem in the future.
source
share