Home » Chrome changes PWA installation criteria: Service Worker no longer required

Chrome changes PWA installation criteria: Service Worker no longer required

by admin
Chrome changes PWA installation criteria: Service Worker no longer required

Chrome changes PWA installation criteria: Service Worker no longer required

Progressive web apps are web applications that can be installed on the user’s device. For a long time, the prerequisite for this in Google Chrome and Microsoft Edge was that the application had to be able to be used offline. For the user experience, usability is desirable even when the user is offline – at least as far as possible. Anyone who took the extra effort to implement this was rewarded with the ability to install the application.

Advertisement

The progressive web app pwapraxis.liebel.io implements the offline-first model: todos can be created and checked off at any time.

Christian Liebel (@christianliebel) is a software developer at Thinktecture in Karlsruhe. He supports his customers with digitalization projects and the modernization of business applications. His hobbyhorse is cross-platform applications based on modern web technologies such as Angular, Progressive Web Apps, Project Fugu and Web Components. He has been recognized as a Microsoft MVP and Google GDE for his community contributions.

Service workers are used to implement offline capability in web applications. This is a piece of JavaScript registered by the website that acts as a proxy between the web application and the network and has access to a client-side, programmable cache. If you save the required source files of the application in the cache and deliver them from there when offline, the application can also be operated without an internet connection.

However, resourceful web developers have maneuvered around this requirement: some used an empty service worker to fulfill the condition. Google then followed suit and required a fetch event handler so that the service worker was, at least in theory, able to make the website available offline. So sites simply deployed this event handler and redirected all requests against the network. As a result, the goal was not achieved again and the additional check resulted in considerable additional work for the browser.

See also  The production of electronic boards: types and components

With Chromium 109 (mobile) and 110 (desktop), new offline fallback views for installed web applications were implemented in January 2023: The offline experience is automatically generated by displaying the application’s icon and the message “You’re offline”.

If the website does not provide an offline page, Chrome will generate it automatically.

Since then, the need for a service worker and therefore offline capability has been completely eliminated. This means that Chrome and Edge are also getting closer to Safari: installing websites on the iPhone has been possible since the early days, without any conditions. In the case of Chrome and Edge, however, a web application manifest is still required as well as the transmission of the website via HTTPS (see installation criteria).

Service workers have the disadvantage that they are written in JavaScript and have to be spun up in order to deliver websites or receive push notifications. To address this, Navigation Preloads has been developed to speed up network queries at service worker startup, while for push notifications there is an alternative proposal, Declarative Web Push. Writing such infrastructure code is also quite unusual for web developers.

However, the implementation of a useful offline version remains a central component of a good user experience. PWA developers should therefore continue to offer these in the future to make their users happy.

(rme)

To home page

You may also like

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Privacy & Cookies Policy