Javascript provides you with an offline website feature called UpUp Javascript Framework . A small script that ensures that your site will always be available to your users, even if they are on an airplane or 20,000 leagues under water.
<html> <head> <meta charset="UTF-8"> <title>Lonely Globe Advisor</title> </head> <body> <h1>Top Hotels in Rome</h1> <ol> <li>Villa Domus - Via Piacenza 9, Rome, Italy</li> <li>Hotel Trivelli - Piazza Barberini 11, Rome, Italy</li> </ol> <script src="/upup.min.js"></script> <script> UpUp.start({ 'content-url': 'offline.html', 'assets': ['css/bootstrap.min.css', 'css/offline.css'] }); </script> </body> </html>
Now the content that our users see when they are offline is offline.html content. This is a simple HTML file, different from any other page on our site.
Our offline.html file contains two css files: bootstrap.min.css and offline.css . Make sure they are cached and available to our users when they are offline.
GeekOnJava Sep 28 '15 at 5:57 2015-09-28 05:57
source share