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

Proposal: Performance Budgets #44

Open
Seirdy opened this issue Aug 16, 2022 · 0 comments
Open

Proposal: Performance Budgets #44

Seirdy opened this issue Aug 16, 2022 · 0 comments

Comments

@Seirdy
Copy link

Seirdy commented Aug 16, 2022

Proposed directives

Document-Policy directives such as size-markup, size-images, size-styles, and size-scripts can specify (in kilobytes or kibibytes?) the cumulative sizes of a type of resource; a generic size directive can specify the limit to the size of a page, including all its assets.

Use-cases

  • User-agents can know the size limit of a page and its resources just from the response headers of the document. This can inform adaptations for metered connections. For example, the user-agent will know whether to proxy the full page through a webpage-compression service (e.g. Google Web Light), just the images, or none of it at all.

  • Authors will be able to specify generic size restrictions on third-party content they do not control. We already have ways for authors to specify image weight (the "max-bpp" directives), but this could generalize it to cumulative weights for resources by category.

  • Search engines will be able to more easily evaluate a page's relevance for users who send prefers-reduced-data hints.

  • Lazy and conditional loading makes it difficult to estimate the size of a page until the user has scrolled to the bottom. These directives can make ceilings on page-weight explicit.

Further discussion

  • How should setting a budget to "0" compare to blocking the resource in the CSP?

  • How should user-agents interpret budgets if the user-agent disables images, or disables images exceeding a certain size (common with content-blockers)?

  • What other performance budgets should we specify?

  • Is there any merit to including an "inf" value, effectively re-setting an existing size directive?

  • Should syntax take into account the possibility of future, non-performance types of budgets? If so, should this be split into another header (e.g. "Performance-Policy)? Examples may include a "privacy budget" (part of Google's Privacy Sandbox initiative) in which a UA and a website can specify a preferred budget and the UA can default to the minimum.

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

1 participant