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

Improve handling of crossorigin attribute in LinkManager #233

Open
schlessera opened this issue Jun 7, 2021 · 0 comments
Open

Improve handling of crossorigin attribute in LinkManager #233

schlessera opened this issue Jun 7, 2021 · 0 comments
Labels
Optimizer Tech Debt Deprecations, inefficiencies, code health

Comments

@schlessera
Copy link
Collaborator

PR review comment by @westonruter on #179:

If the script elements have crossorigin then the preload links also must have crossorigin, or else the preload is wasted. It appears that we only add crossorigin to scripts when ESM is enabled, so this appears to work properly at the moment. But there should be a configuration option in RewriteAmpUrls to always use crossorigin. See ampproject/amp-wp#4600. The use of crossorigin=anonymous should probably be enabled by default.

@schlessera schlessera added Tech Debt Deprecations, inefficiencies, code health Optimizer labels Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Optimizer Tech Debt Deprecations, inefficiencies, code health
Projects
None yet
Development

No branches or pull requests

1 participant