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 sendBeacon set the FetchRequest's cacheMode to "no-cache"? #48

Closed
cdumez opened this issue Aug 7, 2017 · 4 comments
Closed

Should sendBeacon set the FetchRequest's cacheMode to "no-cache"? #48

cdumez opened this issue Aug 7, 2017 · 4 comments

Comments

@cdumez
Copy link

cdumez commented Aug 7, 2017

Should sendBeacon set the FetchRequest's cacheMode to "no-cache"?

Based on code introspection, Blink seems to bypass the cache by adding "max-age=0" Cache-control header on the request. I don't know about Gecko.

Seems to me that sendBeacon() should bypass the cache.

@igrigorik
Copy link
Member

Tracing back, it looks like that was introduced in original implementation in Blink. Testing in FF, I don't see max-age or any other cache-related request headers. @nolanlawson @toddreifsteck Edge?

Seems to me that sendBeacon() should bypass the cache.

Curious, what makes you say that? It's not obvious to me why we should special case sendBeacon; seems like the decision should rest with the endpoint. Also, if we special case sendBeacon, then we should also think about the "keepalive" flag in Fetch.. and there I think it makes even less sense?

/cc @tyoshino

@igrigorik
Copy link
Member

nudge

@cdumez any followup thoughts or questions on this one? As stated above, I don't believe we should be special casing this. As next steps, I propose we (a) open a Chrome bug to remove max-age=0 and (b) close this with no action on the spec. Does that sound reasonable?

@cdumez
Copy link
Author

cdumez commented Aug 15, 2017

Ok.

@cdumez cdumez closed this as completed Aug 15, 2017
@igrigorik
Copy link
Member

Thanks! Filed Chrome bug: https://crbug.com/755725

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

No branches or pull requests

2 participants