Skip to content

Commit

Permalink
Update links to URLPattern spec
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyroman authored Nov 2, 2023
1 parent d16e7f9 commit 20dee83
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion no-vary-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ Even for applications that are not usually client-side rendered, such a pattern

We think these use cases are best addressed by a future addition, similar to `No-Vary-Search` in spirit but different in details. We call this hypothetical future proposal `No-Vary-Path`.

In particular, splitting apart query and path handling makes sense because their in-practice semantics are very different. Although at some level both are opaque strings, in various parts of the HTTP ecosystem (e.g. server runtimes, CDNs, URL APIs, etc.) paths are treated as an ordered series of slash-delimited strings, and queries are treated as a usually-unordered multimap. So the syntax for specifying how a path would contribute to key calculation, versus a query, would likely be different. (Concretely, we suspect path handling would be based on [URL patterns](https://github.com/WICG/urlpattern), which are good for describing varying paths but bad for describing varying queries.)
In particular, splitting apart query and path handling makes sense because their in-practice semantics are very different. Although at some level both are opaque strings, in various parts of the HTTP ecosystem (e.g. server runtimes, CDNs, URL APIs, etc.) paths are treated as an ordered series of slash-delimited strings, and queries are treated as a usually-unordered multimap. So the syntax for specifying how a path would contribute to key calculation, versus a query, would likely be different. (Concretely, we suspect path handling would be based on [URL patterns](https://urlpattern.spec.whatwg.org/), which are good for describing varying paths but bad for describing varying queries.)

The security considerations for `No-Vary-Path` _might_ be trickier than [those for `No-Vary-Search`](#security-and-privacy-considerations), given the existence of shared hosting environments that are sometimes sharded by path alone. Although path is not usually recognized as a security boundary on the web platform, some features like [service workers](https://w3c.github.io/ServiceWorker/#path-restriction) have decided to add some path-based restrictions, so if we explore `No-Vary-Path` we'll need to carefully study their discussions and conclusions.

Expand Down
2 changes: 1 addition & 1 deletion triggers.md
Original file line number Diff line number Diff line change
Expand Up @@ -498,5 +498,5 @@ Another alternative would be to introduce a `Script` header, given that we’re
[resource-hints]: https://github.com/w3c/resource-hints
[selector-match]: https://drafts.csswg.org/selectors-4/#match-a-selector-against-an-element
[selectors]: https://drafts.csswg.org/selectors/
[urlpattern]: https://github.com/WICG/urlpattern
[urlpattern]: https://urlpattern.spec.whatwg.org/
[webdriver]: https://github.com/w3c/webdriver

0 comments on commit 20dee83

Please sign in to comment.