Currently, both the Request
and Response
classes contain a bunch of properties that likely have no effect server-side.
request.destination
request.referrer
request.referrerPolicy
request.mode
*request.cache
"...indicating how the request will interact with the browser’s cache when fetching"request.integrity
"A cryptographic hash of the resource to be fetched by request."request.isReloadNavigation
request.isHistoryNavigation
(options that are passed to the Request
constructor)
RequestInit.referrer
: "A string whose value is a same-origin URL"RequestInit.referrerPolicy
: "A referrer policy to set request’s referrerPolicy."RequestInit.mode
: "A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request’s mode. If input is a string, it defaults to "cors"."RequestInit.credentials
: see request.credentials
*RequestInit.cache
: see request.cache
RequestInit.integrity
: see request.integrity
RequestInit.window
: "Can only be null. Used to disassociate request from any Window."* omit
and include
may be useful for developers, however same-origin
is not.
** cors
should be omitted from this type.
As you can see, each environment is different in supported properties which can cause cross-platform confusion. It also makes everything more confusing considering that these platforms typically leave in unsupported properties in their typings, but do not document which types are ignored (unless you look for it on google).
Potential Solutions:false
for request.isHistoryNavigation
). Default flags would also be needed for RequestInit
as the spec heavily defines fetch's behavior from certain flags being set.<-- Original fetch spec -->
# some title
1. If request's mode is "cors" then:
...
2. Perform scheme fetch.
3. If request's `referrer` is not this's current settings origin url then:
1. Abort this request.
2. Return a network error.
// and so on
<-- Server environment spec -->
# some title
1. Ignore step 1
3. Ignore step 3
// and so on
exoticknight and jdalrymple
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4