Hello. Yesterday I found a library on js, called upup , with the help of it you can display the site pages when the internet connection is gone.
As stated in the official documentation , all that is needed is to connect the library and output what we need. (This can be a page, or just an inscription).
How I did:
Before closing </body> inserted <script src="upup.min.js"></script> , the documentation says that the library is in the root of our site and not in the child folder.
Then I wrote a simple phrase that should be shown when a connection is lost:
<script> UpUp.start({ content: 'Cannot reach site. Please check your internet connection.' }); </script> In fact, it should have worked, but it does not work. Still shows a browser error, although this works on the site upup , you can go to the site and disable the Internet.