I have an idea about service workers in websites.
I have service worker that caches ALL web app files from CSS, JS to ALL the used images once activated, that is the purpose of service worker, right. It’s like an app installation (once you register).
However, I do not see any point of installing it on every new user visit, in case the user never/ever visits any other page on my website, and the user never/ever returns to my website or registers an account, right? This takes a lot of extra bandwidth to cache ALL the website files the user may not need, because the user visits only first home page and leaves.
What’s the idea behind of deploying service worker all the time, like Twitter does, can anyone explain?