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

Application/json connection concerns #8500

Closed
patmmccann opened this issue May 31, 2022 · 9 comments
Closed

Application/json connection concerns #8500

patmmccann opened this issue May 31, 2022 · 9 comments
Assignees

Comments

@patmmccann
Copy link
Collaborator

#8498 indicates ajax type application/json causes performance issues. A quick search indicates it is used widely in the project. Should this be remedied?

@patmmccann
Copy link
Collaborator Author

@patmmccann
Copy link
Collaborator Author

contentType: 'application/json',
as an example

@dgirardi
Copy link
Collaborator

dgirardi commented Jun 2, 2022

I prefer MDN as a resource to understand when CORS preflights are not triggered: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests

In general I don't think Prebid itself can act on this besides maybe issuing a recommendation to the adapters, because their backend may need work to accept "simple" requests. For example, if I am reading that spec right, any adapter that uses Cookie (called withCredentials in ajax) would need to rewrite their backend to take in that data from somewhere else. (even just a Content-Type change may trip up their backend).

@patmmccann
Copy link
Collaborator Author

@ChrisHuie could you add a pr to the bidder page to https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests to raise awareness?

@patmmccann patmmccann moved this from Needs Req to Ready for Dev in Prebid.js Tactical Issues table Jun 6, 2022
@patmmccann
Copy link
Collaborator Author

@dgirardi by way of example, this fastlane request contained no preflight

image

while these yahoo ones do

image

@dgirardi
Copy link
Collaborator

dgirardi commented Jun 6, 2022

@patmmccann, you are right, I was mistaken about withCredentials. Although I think - with the risk of misunderstanding the spec again - that more than 128 bytes in the Cookie header would still trigger it.

I'm still of the opinion that this cannot/should not be reduced to the content-type (some adapters rely on custom headers for example). Each SSP should decide to make "simple" requests a goal and perform their own testing.

@patmmccann
Copy link
Collaborator Author

@ChrisHuie any update? would love to close this out

@ChrisHuie
Copy link
Collaborator

@ChrisHuie any update? would love to close this out

I will get this in this week

@bretg
Copy link
Collaborator

bretg commented Jun 30, 2022

closing this - tracked now by the docs PR

@bretg bretg closed this as completed Jun 30, 2022
Repository owner moved this from In progress to Done in Prebid.js Tactical Issues table Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

4 participants