Please don't convert your website to PWA before thinking if it really adds an value to your visitors first. Some sites are just great as they're now. I understand you spent time "pimping up" your website, but No I don't want to receive push notification from your site, or ability to visit your website offline. Maybe I'm visiting your website for just single article and you'll never see me again. It reminds me AMP situation. Those who stepped into hype train, are now those whose starting to realise that maybe it wasn't such a great idea at first place.
> No I don't want to receive push notification from your site...
A PWA does not equal push notifications. Those are completely optional and should of course only be added where that makes sense. And even then, you'd have to agree to receiving them first.
> ...or ability to visit your website offline
Fine, you don't have to. In that case, the service worker just improves page speed and reduces data usage.
browser already do caching well, but you have to setup your server to sent correct headers and it's kind of difficult (unpractical) to set different caching policy for different kind of files if you're hosting many different sites, or you're on shared hosting. With service worker you can have more granular control over caching. But again, you really have to know, what are you doing. For regular website using service worker to improve caching is IMO overkill and also there is small chance, you'll make it unwillingly worse.
> it's kind of difficult (unpractical) to set different caching policy for different kind of files if you're hosting many different sites, or you're on shared hosting
No it's not. In Apache and Nginx (and I assume any other half decent web server) it is very easy to specify different cache times for each file extension. Same on shared hosting (.htaccess)
apache yes, but what about nginx? And there are many other ways, how to host your site (Amazon S3,...).
Also by unpractical I mean you have to have access to the server (ssh...). IMO it should be more concern of an app then server. But I'm not advocate for service worker for static resource caching (for websites).
Those were just examples. PWA is short for progressive web application. And this article title is "Turning your website into PWA". My point is, that if your site is just regular website not an application, staying conservative about implementing features is better, then implementing them recklessly, just for temporary page rank boost, or to show how cool programmer your are.
EDIT: still talking about regular websites? First visit or repeated visit? Most website already can take advantage of plain browser caching and service worker is IMO hard to sell here.
Repeat visit, of course :) The service worker can't do anything before it's installed (during the first visit). The browsers' network cache is great, but IIUC the browser still performs those 'if-modified-since' requests, doesn't it? Additionally, depending on your server setup and CDN, some assets may have a short max-age value, meaning they're reloaded more often than needed. With service worker, the website can create its own cache and have full control over it. In other words, the site can guarantee that its assets will be loaded directly from the browser's memory.