W
W
ward_ua2021-10-01 19:35:02
Browsers
ward_ua, 2021-10-01 19:35:02

How do self-caching (if that's the word) web applications work?

Good evening. I noticed for a long time that if there is no Internet connection, some web applications (for example, Outlook) are still loaded, and a message about the lack of connection appears on the page of the application itself. Before I started studying web development, this "phenomenon" did not interest me in any way, but now I am seriously thinking about how it works. I have a theory on how this might work. I ask you, dear Habrausers, to answer my question if I'm right, and if I'm wrong, correct it. I assume that such applications run on two (or more) types of servers: one sends application pages that store themselves in the browser cache when we access the URL, and the other connects the application itself using JavaScript and receives data from there (emails And so on). Then a logical question arises: how does the application "force" the browser to cache itself and use the cached data when there is no connection? Thank you all in advance for your replies.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex Glebov, 2021-10-01
@ward_ua

In YouTube, it is implemented through the Service Worker https://developer.mozilla.org/en/docs/Web/API/Serv...
Through pwa, you can also

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question