title: How to display a message if error occurs (say no internet connection) jQuery
body: <p>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?</p>
  
  <p>something like this. Google's Gmail have also something similar.</p>
  
  <p><a href="https://i.stack.imgur.com/EvRni.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EvRni.jpg" alt="enter image description here"></a></p>