Keep an offline message in the browser . Gmail , YouTube etc
-
02-06-2021 - |
Вопрос
When the internet connection is unavailble, and we try to browse to Gmail when it had opened earlier, a message can be seen:
Gmail The app is currently unreachable.
This same way also with Youtube.
In the Gmail offline message, I saw this attribute in the body tag:
jstcache="0"
How can we implement such a page when the page/browser is offline ?
Решение
They're using offline browsing, another new feature in the HTML5 spec. Take a look here: http://diveintohtml5.info/offline.html
It enables you to define certain assets on your site, using a manifest, that are cacheable. The browser will save them and display accordingly whenever the user is offline.
Не связан с StackOverflow