3 rea­sons to use ser­vice work­ers

Web Designer - - Build Progressive Web Apps With Workbox -

1 Off­line sup­port

The head­line fea­ture of ser­vice work­ers is that they al­low you to build pages that work off­line and with in­ter­mit­tent net­work con­nec­tion, by serv­ing up con­tent from a browser cache in the man­ner of your choos­ing.

2 Speed

No­body likes wait­ing for a page to load. Load­ing con­tent from a cache is nearly in­stan­ta­neous, and be­cause you can con­trol caching at a gran­u­lar level, ser­vice work­ers al­low you to take ad­van­tage of this with­out risk­ing show­ing stale data.

3 Na­tive fea­tures

Be­cause they run in the back­ground, ser­vice work­ers let you do things you take for granted in na­tive apps but couldn’t pre­vi­ously do on the web. Push no­ti­fi­ca­tions and back­ground syn­chro­ni­sa­tion are two ex­am­ples of this.

Newspapers in English

Newspapers from UK

© PressReader. All rights reserved.