Progressive Web Apps: Are you offline? Not a Problem Anymore!

Can you image your favorite web app working offline? Well, Progressive Web Apps (PWA) are here. One of their main benefits is that Service Workers will allow you to continue loading your apps even when there’s no internet connection.

Pretty amazing, eh?

 

Service Workers, the Magic

Service Workers are very powerful. They allow offline functionality, push notifications, content caching, and more. They have a short lifetime, and the way they work is by waking up when they get an event (e.g., network requests, push notifications, connectivity changes) and then they start running only as long as the process needs it.

They are scripts working behind the scenes.

Service Workers are also helpful for offline caching and performance. You can write code to cache your application shell to work offline and populate its content using JavaScript.

One more thing: Push Notifications

Web apps can send push notifications to your devices, even while Chrome isn’t running, through the magic of ServiceWorker.

The Chrome DevTools have a brand new mobile device mode and animation inspector called Chrome Canary.

Demo Site

During the Google I/O 2016 a demo was announced. You can test it in any browser by visiting washingtonpost.com/pwa.

progressive-web-apps-are-you-offline-not-a-problem-anymore-side

You can start by turning your internet connection off after first loading the site. Once you’re offline, then try to read the posts by clicking the links. You'll discover that you’re able to continue reading the news even though you are offline.

You can find other Service Worker samples, at Google's GitHub site.

In Summary

Progressive Web Apps are meant to be the new standard of the mobile web. PWA combines the engagement of native apps with the reach of the web.

It’s important to remember that Progressive Web Apps work everywhere, they are not unique to Chrome for Android. PWA requires HTTPS, but a secure page is not a luxury these days.

Share this post

Table of Contents