diff --git a/files/en-us/_redirects.txt b/files/en-us/_redirects.txt index e7612421658c4ed..7ae1556ad160078 100644 --- a/files/en-us/_redirects.txt +++ b/files/en-us/_redirects.txt @@ -8428,6 +8428,7 @@ /en-US/docs/Web/API/Request/arrayBuffer /en-US/docs/Web/API/Body/arrayBuffer /en-US/docs/Web/API/Request/blob /en-US/docs/Web/API/Body/blob /en-US/docs/Web/API/Request/bodyUsed /en-US/docs/Web/API/Body/bodyUsed +/en-US/docs/Web/API/Request/context /en-US/docs/Web/API/Request/destination /en-US/docs/Web/API/Request/json /en-US/docs/Web/API/Body/json /en-US/docs/Web/API/Request/text /en-US/docs/Web/API/Body/text /en-US/docs/Web/API/Resource_Timing /en-US/docs/Web/API/Resource_Timing_API diff --git a/files/en-us/_wikihistory.json b/files/en-us/_wikihistory.json index 4c4fea6301c87e5..1d77381c8c3217a 100644 --- a/files/en-us/_wikihistory.json +++ b/files/en-us/_wikihistory.json @@ -75640,19 +75640,6 @@ "kscarfone" ] }, - "Web/API/Request/context": { - "modified": "2020-10-15T21:33:26.207Z", - "contributors": [ - "sideshowbarker", - "Sheppy", - "fscholz", - "chrisdavidmills", - "jpmedley", - "Sebastianz", - "mathiasbynens", - "kscarfone" - ] - }, "Web/API/Request/credentials": { "modified": "2020-10-15T21:33:25.687Z", "contributors": [ diff --git a/files/en-us/mozilla/firefox/releases/42/index.html b/files/en-us/mozilla/firefox/releases/42/index.html index 0fb6c704d27a852..75e3593e0de9e40 100644 --- a/files/en-us/mozilla/firefox/releases/42/index.html +++ b/files/en-us/mozilla/firefox/releases/42/index.html @@ -73,7 +73,7 @@
Request.context
has been removed ({{bug(1188062)}}).dom.push.enabled
pref in about:config.The deprecated context
read-only
- property of the {{domxref("Request")}} interface contains the context of the Request
- (e.g., audio
, image
, iframe
). This
- defines what sort of resource is being fetched. This has been replaced by the
- {{domxref("Request.destination", "destination")}} property.
The context of a request is only relevant in the ServiceWorker API; a service worker - can make decisions based on whether the URL is for an image, or an embeddable object - such as a {{htmlelement("video")}}, {{domxref("iframe")}}, etc.
- -Note: You can find a full list of the different available contexts - including associated context frame types, CSP directives, and platform feature - examples in the Fetch - spec request context section.
-var myContext = request.context;- -
A {{domxref("RequestContext")}} value.
- -In the following snippet, we create a new request using the - {{domxref("Request.Request()")}} constructor (for an image file in the same directory as - the script), then save the request context in a variable:
- -var myRequest = new Request('flowers.jpg'); -var myContext = myRequest.context; // returns the empty string by default- -
{{Compat}}
- -default
, reload
, no-cache
).audio
, image
, iframe
, etc.)omit
, same-origin
, include
). The default is same-origin
.