October 21, 2024
Chicago 12, Melborne City, USA
HTML

How do websites display a page showing “you are offline”


Some websites manage to display an error page when you try to access them again while offline. For instance, this shopping site:
https://www.mumzworld.com/sa-ar/graffiti-resin-graffiti-resin-color-yellow-100ml?geo=false

If you access that page, close it, turn off your internet, then try to access it again, Chrome will show a page that still looks like the website, saying "Sorry, there seems to be an error".

Is this a cache of the page, which means that each page displays this by default unless it detects that it can get the actual page data from the Internet?

And how do you force this behavior, considering that the vast majority of websites don’t show at all if you have no internet, cache or no cache?

Or is that "simply" a progressive web app?



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video