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

maximum data size rules still seem ambiguous #42

Closed
dbaron opened this issue May 10, 2017 · 2 comments
Closed

maximum data size rules still seem ambiguous #42

dbaron opened this issue May 10, 2017 · 2 comments

Comments

@dbaron
Copy link
Member

dbaron commented May 10, 2017

The sendBeacon() spec specifies that UAs must enforce a maximum data size, but it doesn't say what that data size is or how they should enforce it.

If someone were to write a new implementation of sendBeacon(), they'd want the information that's in #38 about the actual limits that are enforced -- otherwise sendBeacon() calls that sites expect to work might not work in that implementation.

I'd think that the information you need to build a working implementation ought to be in the spec.

@igrigorik
Copy link
Member

The enforcement is defined in Fetch API, and we decided earlier not to duplicate it in two places. In Beacon we say:

Requests initiated via the Beacon API automatically set the keepalive flag, and developers can similarly set the same flag manually when using the Fetch API. All requests with this flag set share the same in-flight quota restrictions that is enforced within the Fetch API.

In Fetch API, section 4.5, step 9.5:

If the sum of contentLengthValue and inflightKeepaliveBytes is greater than 64 kibibytes, then return a network error.

Is this not enough, from you perspective?

@dbaron
Copy link
Member Author

dbaron commented May 11, 2017

Normatively referencing fetch is great.

But given that, the conformance text such as:

The user agent MUST restrict the maximum data size to ensure that beacon requests are able to complete quickly and in a timely manner.

seems like it should instead be an informative reference, and this text:

If the amount of data that can be queued to be sent by keepalive enabled requests is exceeded by the size of transmittedData, set the return value to false and terminate these steps.

should reference the location of the definition of the amount of data that can be queued.

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