Re:Turn your website into a Progressive Web App
by StavrosK on Wednesday July 12, 2017 @01:42PM
(#14754659)
> the service worker just improves page speed and reduces data usage
Hmm, how does it do that? I don't see what advantages it may have over caching and HTTP/2 push...
Re:Turn your website into a Progressive Web App
by finchisko on Wednesday July 12, 2017 @02:42PM
(#14755290)
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.
Re:Turn your website into a Progressive Web App
by eberkund on Wednesday July 12, 2017 @05:45PM
(#14756973)
> 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)
Re:Turn your website into a Progressive Web App
by finchisko on Wednesday July 12, 2017 @11:53PM
(#14758568)
>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).
Re:Turn your website into a Progressive Web App
by eberkund on Thursday July 13, 2017 @10:56AM
(#14761768)
Pretty much all the shared hosts I've seen use Apache (or lighttpd) specifically because of htaccess files.
Re:Turn your website into a Progressive Web App
by finchisko on Wednesday July 12, 2017 @02:28PM
(#14755162)
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.
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.