Open souldanger opened 5 years ago
Sorry, I'll merge this PR in 10 days because of Chinese Spring Festival.
Where should we store the source code of sw-register.js
and inline script? We may need change them someday in the future.
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.
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...