2019-05-01+Web+Designer+UK

(Brent) #1
Service workers enabled Konga
to send 63 per cent less data for
initial page loads, and 84 per
cent less data to complete the
first transaction

86 _____feature


oogle’s endorsement of web-based applications
goes back over a decade. In 2009, VP of
engineering Vic Gundotra heralded the web as“the
dominant programming model of our time” (
ly/2U9SnYF) in relation to HTML’s ability to match
previous advantages of hardware-based
development. This backing continued to 2016 where Google’s
platform refurbishment took the form of pushing Progressive Web
Apps (PWAs), user experiences they claim are reliable, fast and
engaging (bit.ly/1nlXeEV). So what do they have to offer?

Service workers are JavaScript written client-side proxies that
give developers more control of the cache. By pre-caching
certain resources, it eliminates dependency on the network,
allowing the app to load from the user’s home screen instantly,
even in uncertain network conditions.
Security has historically been a trump card of enclosed native
applications. If web apps were to ever rival native in this trait, the
user must be offered a secure connection wherever they choose
to browse, hence why HTTPS is a requirement of PWA.
Again, signs of heavy Google-endorsement are clear to see. Its
search algorithm will prioritise HTTPS over sites with a Secure
Socket Layer (SSL). Only secure mobile sites are candidates for
Accelerated Mobile Pages (AMP) (bit.ly/2VldGGR), and since
Chrome 56, a ‘not secure‘ label appears next to any URL that is
not served over HTTPS. This gives the web a visible layer of trust
that is otherwise hidden in native apps — an edge set to become
increasingly important to today’s users seeking understanding
and control of the flow of personal data.

Service workers and modern development processes pay
dividends when it comes to improving a web app’s first page
load. But where PWAs really come into their own is in the
loading of subsequent pages. The service worker caches the
app shell and other assets on install, instantly displaying content
to users while they browse rather than making a request for
new content on each following page load.
This brings page load times down to insignificance. A recent
report from Mobify (bit.ly/2UdeNIA) states the median
successive page load time for a PWA is 1.4 seconds. The industry
average is 6.2 seconds.

Progressive web apps can be installed to a user’s home screen
without going through an app store. These installed apps then
adopt features that make them indistinguishable from a native
app. They load from an app icon into a rich full-screen
experience without the distracting omnibox or browser controls,
allowing designers to build in their own app-style navigation
(bit.ly/2zILXJO) exclusively for this immersive experience.

With the help of a web app manifest file, PWAs appear in all the
areas you’d expect a native app to appear. This includes the app
launcher, settings app and task switcher. Any links to the website
from external sources open in the installed app, and even users
signed up for push notifications, can access those in the same
places as their other app notifications.
Free download pdf