F
F
freestm2017-10-15 19:57:05
JavaScript
freestm, 2017-10-15 19:57:05

What is registerServiceWorker in React?

What file does react create in src/registerServiceWorker.js ? What is he responsible for and what will happen if he is removed?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Taratin, 2017-10-15
@Taraflex

https://tuhub.ru/other/progressive-web-app-with-react/

A
Andrey Titov, 2021-01-22
@titov_andrei

The service worker actually acts as a proxy server between the web application and the browser, as well as the network (if available). It allows (among other things) to describe the correct offline behavior of a web application, to intercept network requests and take appropriate action based on network availability, and to update the data located on the server when it is accessed. They also have access to push notifications and background sync APIs.
...
https://developer.mozilla.org/en/docs/Web/API/Serv...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question