Skip to content

Commit c598fcc

Browse files
authored
Add open questions to Network Efficiency Guardrails explainer (#1256)
Transfer new comments from design doc as open questions in Network Efficiency Guardrails explainer.
1 parent 7c3fa53 commit c598fcc

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

PerformanceControlOfEmbeddedContent/neg-explainer.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ This allows applications to become aware of inefficient network behavior which i
4141
- [Threshold design considerations](#threshold-design-considerations)
4242
- [Violation reporting](#violation-reporting)
4343
- [Policy enforcement](#policy-enforcement)
44+
- [Open questions](#open-questions)
4445
- [Future considerations: cross-document reporting](#future-considerations-cross-document-reporting)
4546
- [Alternatives considered](#alternatives-considered)
4647
- [Relying on existing performance measurement APIs](#relying-on-existing-performance-measurement-apis)
@@ -80,14 +81,14 @@ When the policy is active, the User Agent monitors network resource requests ini
8081

8182
Specifically, the User Agent flags the following conditions as policy violations:
8283

83-
1. **Text-based resources served without HTTP compression**
84+
1. **Text-based resources served without HTTP compression.**
8485
Text‑based resources such as HTML, CSS, JavaScript, and JSON are expected to be delivered using HTTP‑based compression.
8586

86-
2. **Uncompressed file formats when compressed alternatives are available**
87+
2. **Uncompressed file formats when compressed alternatives are available.**
8788
Non‑text resources are expected to use compressed formats when such formats are supported and available. For example, using `.ttf` fonts instead of `.woff`.
8889

89-
3. **Resources with excesive total size**
90-
To limit disproportionate network cost, size thresholds apply to following resources and non‑network resource embeddings:
90+
3. **Resources with excesive total size.**
91+
To limit disproportionate network cost, size thresholds apply to the following resources and non‑network resource embeddings:
9192

9293
* data: URLs larger than 100 kB
9394
* Image files larger than 200 kB
@@ -150,6 +151,19 @@ When enforcement is enabled for `network-efficiency-guardrails`, resource reques
150151

151152
Enforcement builds on the same violation detection and reporting model described above. For this reason, it is expected that sites would deploy the policy in reporting‑only mode first, using the resulting reports to evaluate impact before enabling enforcement.
152153

154+
### Open questions
155+
156+
As the proposal evolves through incubation, there are several related areas that may warrant further discussion and refinement.
157+
158+
**Compression eligibility for additional resource types**
159+
The current criteria distinguish between text‑based resources, which are required to be served with HTTP compression, and non‑text resources, which are subject to size‑based limits but are not required to be compressed. Some binary formats, such as WebAssembly modules, are commonly served in compressed form and can incur significant network cost when uncompressed.
160+
161+
Whether additional compressible binary resource types should be subject to compression requirements, size‑based limits, or a combination of both is an open question for further discussion. Because the policy may block resources when enforcement is enabled, any such criteria would need to be defined explicitly: either as part of the existing policy configuration, under a separate configuration point, or through [parameters on Document Policy](https://wicg.github.io/document-policy/#issue-91264ad1).
162+
163+
164+
**Handling of very small text resources**
165+
For sufficiently small payloads, the overhead of applying HTTP compression may outweigh its benefits, depending on the compression algorithm and transport. Allowing exceptions or lower bounds for compression requirements on very small resources is a potential refinement. However, introducing such exceptions raises questions around threshold selection, which would need to be considered during incubation. For example, whether a single common threshold should apply across compression algorithms, or whether algorithm‑specific thresholds would be appropriate.
166+
153167
### Future considerations: cross-document reporting
154168

155169
While we believe the proposed policy is useful and complete as defined in this document, enabling controlled reporting across document boundaries would further amplify the value of this signal in embedded scenarios. In many real‑world cases, inefficient resource usage originates in a nested document, while the resulting performance impact is primarily experienced by the embedding document. Allowing embedders to receive policy violation information would enable more effective diagnosis and remediation of such issues.
@@ -235,3 +249,4 @@ And to the contributors and reviewers who helped shape the `network-efficiency-g
235249

236250
* [Yoav Weiss](https://github.com/yoavweiss)
237251
* [Fabio Rocha](https://github.com/fabiorocha)
252+
* [Adam Rice](https://github.com/ricea)

0 commit comments

Comments
 (0)