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

Allow custom HTTP headers to be defined for a preload request #7887

Open
yoavweiss opened this issue May 4, 2022 · 6 comments
Open

Allow custom HTTP headers to be defined for a preload request #7887

yoavweiss opened this issue May 4, 2022 · 6 comments
Labels
addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest topic: resource hints (inc. preload)

Comments

@yoavweiss
Copy link
Collaborator

Continuation of w3c/preload#157

@annevk annevk added addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest labels May 24, 2022
@jimmydief
Copy link

Please correct me if I'm wrong but this seems especially crucial with planned browser changes to block third-party cookies. Many apps which are embedded in third-party contexts will likely deal with the third-party cookie changes by switching to HTTP headers for authentication. As a result, those apps will lose the ability to preload critical fetch resources which require authentication.

@nate-at-gusto
Copy link

I can't "thumbsup" the archived repo, so I'd like to reiterate this comment about using the type attribute to set Accept. It would certainly work for my use-case, though I can see how this would be a potentially breaking change.

@yoavweiss
Copy link
Collaborator Author

In general for preloads, the as attribute would mean the browser uses the Accept header typically used for the related destination. That won't help you create an Accept: application/json request header though.

@nate-at-gusto
Copy link

If I'm reading Noam's comment here: https://bugs.chromium.org/p/chromium/issues/detail?id=1072144#c18 correctly, I think the underlying issue ("accept header causing preload not be accepted") is resolved?

@zcorpan
Copy link
Member

zcorpan commented Aug 9, 2022

If I understand correctly, the change removed checking of the Accept header when matching the cached entry. So, it makes the error go away, but doesn't let you do content negotiation when preloading.

@mitar
Copy link

mitar commented Feb 13, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest topic: resource hints (inc. preload)
Development

No branches or pull requests

6 participants