Since a majority of users spend their time inside of mobile apps, they don’t want to waste it with connectivity issues or flaky WiFi, according to Pete LePage, a developer advocate for Google.
Developers play an important role in improving these issues, he said, and they need to watch the future of the mobile web to figure out what they can do to deliver more meaningful experiences to their users.
In LePage’s talk today at 2016 Velocity NYC, he said that the mobile web should be three things: reliable, fast and engaging. A user expects the browser to work fast every time, which is probably why about 40% of web app users will abandon a site if it takes more than three seconds to load, he said, which is a lot of people to lose.
(Related: Google buys Apigee)
One way developers can deliver a better user experience is by creating progressive web apps. A progressive web app is different from a mobile application because it requires no installation. It looks and feels like a mobile app because it is built on the app shell model.
Even on networks that aren’t so stable, a progressive web app can still load quickly. It contains an icon on the user’s home screen, and it loads fast to give users a good experience.
According to LePage, progressive web apps also stay up to date because of service worker update processes, which are essentially proxy servers that are between web applications, the browser and available network.
To give an example of how developers can use progressive web apps to make performance changes, he discussed recent updates to The Washington Post’s web app.
The web app for the news publication loads just like every other application, said LePage. Within a few seconds of being on the web page, it asks the user if they want to add it to their home screen of the device. When a user then clicks on this web app on their home screen, it brings them back into the app instantly, giving them a smooth transition from the home screen to the app.
Additionally, performance was a main focus of this web app, so the Washington Post’s articles load in 80 milliseconds, said LePage.
Developers are in control when it comes to creating the right web experience, and they are also in control of what gets cached and what doesn’t, said LePage. Developers should consider a few caching strategies as well, like whether or not a progressive web app should have a cache that falls back to the network. There are plenty of things to try, he said, and while developers have the ability to choose, they still have to keep the user in mind to make sure the app works the way they expect it to.
For the developers that want to take a stab at creating their own service workers, they can check out Google’s Service Worker Toolbox available on GitHub. It provides helpers for developers, as well as common caching patterns and an expressive approach to using these strategies for runtime requests, according to LePage.