I need to display some message to refresh the page or try again later if there is a server communication problem, no internet connection, or ajax request did not respond, etc. And I can find all theses error messages on the console. How can I trigger a message for these?
something like this. Google's Gmail have also something similar.
Check out Check Internet connectivity with jquery
In this part of the code
Of course you can replace
alert()
with whatever styling you want and display it as such.