Connection jumps

Hello to all

in my area it sometimes happens that there is a trend of internet connection very ballet and swinging.
It happens that in moments when the connection is absent even for 20 seconds the program performs absurd calculations, making the user think that the software is buggy.
Is there no way to notify the user of the absence of connection?
Thank you
Mimmo

The only thing I can think of is a timed javascript event that consumes a small ‘hello’ server script to know if it’s still alive. Then enable/disable a div that contains the message ‘online’. Something like that?

Not the answer you are seeking but the below removes issues with internet connectivity.

Have you considered, setting up a local server - this should eliminate all issues relating to Internet connections.
or combine it with a Hybrid system where you have a local and offsite servers with shared / replicating databases?