lesson 2 Flashcards

1
Q

Service worker features

A
  • Can work when the browser is not open so it can handle push events
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How a service worker works?

A

1) The service worker is registered
2) The page gets the new service worker and installs it. The first time the page has the service worker registered it would be controled when it is loaded again

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Https and service worker?

A
  • In the browser service worker works is the site has https.

- The only exception is in the development mode when the the site is served in localhost

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to cache the app shell?

A
  • It must be cached during the installation of the service worker.
  • Handle it in the ‘install’ event
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to update the app shell cache?

A
  • It must be done during the ‘activate’ event

- Delete the cache that have a key different from the current key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to get the app shell out of cache?

A
  • Use the ‘fetch’ event
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is sw-precache?

A
  • It is a library for gulp or grunt to automatically generate a service worker
  • You have to add it to the gulpfile
How well did you know this?
1
Not at all
2
3
4
5
Perfectly