What is common between Pinterest, Tinder, Uber, Trivago, and Airbnb?
All these companies experienced a surge in their product’s performance, user-engagement, and conversions by going mobile-first with progressive web apps.
Why did they go for PWA you ask? Legacy websites of these popular platforms were doing good for big screens but not so much for the small screens. Considering the ever increasing growth of mobile users and loss of potential market they decided to prompt users towards their native apps.
After seeing people bounce from their native apps too, they decided to go with progressive web apps.
This blog covers progressive techniques that Pinterest and other major companies use to build PWAs.
Code-splitting reduces time to interactive by loading only the code that’s needed beforehand while the rest of the code loads lazily.
As a result, Pinterest was able to take down the size of their core bundle from 650KB to 150KB.
Uber and Tinder also took a similar approach and….
The bigger and more css files you have, the longer the page takes to load. Inlining critical CSS eliminates Render-blocking scripts.
Tinder used Atomic CSS to create highly reusable CSS styles to inline all the critical CSS in the initial paint. Tinder used Google Analytics and CSS stats for each release to keep track of what has changed. It saw change in average load times went from ~6.75s to ~5.75s. Thus, removed critical CSS from their core bundles.
Nikkei, a Japan based media business, inlined all the critical CSS with 0 render blocking stylesheets. This optimization helped Nikkei to reduce its first meaningful paint by more than 1 second.
What else can you do besides code-splitting and inlining CSS?
One way to generate a Service Worker file and a list of assets is via Workbox Webpack plugin. Many web applications take advantage of Workbox Webpack plugin for network resilience and offline asset caching. That further has helped these companies to speed up Time To Interactive on repeat visits and first meaningful paint.
Treebo saw 31% improvement in TTI and loaded in under 4 seconds, whereas Pinterest reduced its TTI from 23s to 5.6s.
You can refer to Google Offline Cookbook for other caching strategies.
Making speed one of the core metrics is an important step towards delivering a hassle-free and cutting edge experience to your customers. More and more websites are opting for an offline-first web. It’s only practical to adopt the ‘write once and use anywhere’ approach against writing natively for every other platform.
Google and Microsoft are also working towards a future where PWAs are available alongside full-fledged apps in app stores. It’s safe to say that PWA is in fact the future of the interwebs.
Progressive techniques can give your website a much needed performance boost like these apps that you just read about. Thinking about making the move to PWA? Talk to us here.