Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

souldanger
Copy link
Collaborator

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
Copy link
Contributor

PengXing commented Feb 3, 2019

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

@PengXing
Copy link
Contributor

PengXing commented Feb 3, 2019

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

@souldanger
Copy link
Collaborator Author

souldanger commented Feb 3, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants