L
L
lolka022021-02-03 09:31:37
Network administration
lolka02, 2021-02-03 09:31:37

How to display a stub no internet connection on the site?

in general, I came across this at aviasales.ru

, if I previously visited the site it is displayed, that is, if I now go to aviasales and then turn off the Internet and go, it gives such an error.

But when the Internet is turned off, open in incognito, the browser error is already displayed and not this stub.

How are moments like this set up?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dr. Bacon, 2021-02-03
@lolka02

Yes, go through the Service Worker
PS it is https://www.aviasales.ru/service-worker-pwa.js

D
DDwrt100, 2021-02-03
@DDwrt100

This is the site code. When writing a site, a function is made that checks the availability of the web server.
If the Web server does not respond, then the site displays a stub.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question