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

Default CORS mode based on as type for link preloads #10891

Open
pmeenan opened this issue Jan 3, 2025 · 1 comment
Open

Default CORS mode based on as type for link preloads #10891

pmeenan opened this issue Jan 3, 2025 · 1 comment

Comments

@pmeenan
Copy link
Contributor

pmeenan commented Jan 3, 2025

This primarily affects fonts that are not same-origin where they default to loading as CORS anonymous when loaded by CSS and need the crossorigin attribute to be explicitly set when preloading. If it isn't specified then the preload will not match and the resource will be loaded again.

Since the preload knows the destination type, the preload CORS mode default logic should mirror the CORS logic for the given resource type.

This will mostly affect fonts but it would be good to have all resource preload types defer to the CORS processing of their underlying resource type.

@annevk
Copy link
Member

annevk commented Jan 16, 2025

Someone should study blame and figure out why this wasn't done when we added the attribute. I vaguely recall this has been discussed before.

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

No branches or pull requests

2 participants