ampproject / ampproject/amp-toolbox-php

Improve handling of crossorigin attribute in LinkManager

Open
#233 0 comments 0 reactions 0 assignees View on GitHub
Optimizer Tech Debt
Dominant language
PHP
Stars
74
Forks
25
Avg merge
1d 15h
Merged PRs (30d)
3

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.