One of this technologies is Service Workers.
I’ll use a definition which is given on Mozilla Developer Network page:
Sounds a bit cryptic, isn’t it? There’s another definition right above which makes everything clear right away:
Service workers essentially act as proxy servers that sit between web applications, and the browser and network (when available). They are intended to (amongst other things) enable the creation of effective offline experiences, intercepting network requests and taking appropriate action based on whether the network is available and updated assets reside on the server. They will also allow access to push notifications and background sync APIs.
That’s it! Now everything’s much more clear, Service Worker is something which allows us to:
Last two things are possible because Service Worker is not operating in the context of the page. So it can be active even if website’s page is closed.
There’re some limitations:
Based on features Service Workers provide, you can use them for:
Service Workers are a key technology in implementing Progressive Web Apps.
Do the features Service Workers bring beneficial for customers? Here’re examples of some adopters (they all mentioned in Case Studies section on Google Developer portal):
Some learnings from these case studies:
Taking in account everything mentioned above, you probably should give Service Workers a try, they’re a huge benefit for your customers and the process of introducing them to your project will surprise you (it is easy and straightforward).
Another big question is whether you should use them for desktop web apps. You might be assuming that desktop connection is always guaranteed to be good and fast.
Apparently, it’s not true. You might be providing desktop web app experience for tablet users and… bam! 42% of your customers might be using tablets. And yes, they will have the same connection downsides as mobile phones. Also, according to Shipment forecast of laptops, desktop PCs and tablets worldwide from 2010 to 2019 (in million units), desktops are the minority of newly shipped units, this effectively reduces the probability of having speedy wired connection. Laptop users might be using public low-quality WiFi or the same connection as mobile phone.
So, optimizing for low/no connectivity still matters.
Huge media websites are already providing notifications for desktop users as well as mobile users to effectively re-engage their visitors.
Do you want to lose these customers and opportunities?
Service Workers are the future.
I really enjoyed reading these articles about creating Progressive Web Apps and Service Worker in general: