lavas-project / jekyll-pwa

Jekyll plugin for PWA
MIT License
107 stars 19 forks source link

serve minified sw-register.js and inline script #24

Open souldanger opened 5 years ago

souldanger commented 5 years ago

I have minified sw-register.js and the corresponding inline script. This is to satisfy technical SEO audits w/ i.e. GTmetrics and others, it does not significantly improve the performance as such. The achievement is a handful of ms at the most...

In my case, when building a website/pwa for a client, I always hand out a technical SEO report to prove that the latest, best and fastest technologies have been used. Minifying the above scripts helps getting a better performance rating...

PengXing commented 5 years ago

Sorry, I'll merge this PR in 10 days because of Chinese Spring Festival.

PengXing commented 5 years ago

Where should we store the source code of sw-register.js and inline script? We may need change them someday in the future.

souldanger commented 5 years ago

No problem - have a fantastic festival!! re sw-register.js I would NOT have it as inline script unless we add a nonce to satisfy Content-Security-Policies and avoid 'unsafe-inline'. Instead we should give users the possibility to use https: 'nonce-abcdefg' 'strict-dynamic' in their CSP.