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

Should crossorigin=anonymous be the default for preloading fonts? #10907

Closed
tunetheweb opened this issue Jan 10, 2025 · 2 comments
Closed

Should crossorigin=anonymous be the default for preloading fonts? #10907

tunetheweb opened this issue Jan 10, 2025 · 2 comments

Comments

@tunetheweb
Copy link
Contributor

What is the issue with the HTML Standard?

It's weird that you have to do this for a sameorigin font preload:

<link rel=preload href="/same-origin-font.woff2" as="font" crossorigin>

AFAIK there is a never a use case for preloading a font without this crossorigin attribute (or crossorigin=anonymous which is equivalent).

And if you forget that attribute then the browsers will download the font twice, which is a real footgun for developers (recent example: bluesky-social/social-app#6992).

Should browsers just automatically add crossorigin=anonymous for same-origin font preloads if the developer forgets to include it?

Are there any implications for this (e.g. if same origin resource redirects to a cross origin request)?

See prior discussion here: w3c/preload#32.

CC: @noamr @yoavweiss

@tunetheweb
Copy link
Contributor Author

Oh just found #10891 when I don't typo my searches for already opened issues 😔

Happy to close this and move the discussion there? Or we can keep that generic and try to resolve this specific case here?

Also some further discussion in #7627

@noamr
Copy link
Contributor

noamr commented Jan 10, 2025

Yea let's fold into #10891. #7627 is definitely relevant, but I think we should revise the conclusion we had there.

@domenic domenic closed this as completed Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants