diff --git a/files/en-us/_wikihistory.json b/files/en-us/_wikihistory.json index 94bd18bdd77dbb9..bb06eadc2bf696c 100644 --- a/files/en-us/_wikihistory.json +++ b/files/en-us/_wikihistory.json @@ -79332,17 +79332,6 @@ "kscarfone" ] }, - "Web/API/Response/useFinalURL": { - "modified": "2020-10-15T21:33:29.753Z", - "contributors": [ - "sideshowbarker", - "fscholz", - "chrisdavidmills", - "Sheppy", - "Sebastianz", - "kscarfone" - ] - }, "Web/API/RsaHashedImportParams": { "modified": "2019-03-18T20:56:26.160Z", "contributors": [ @@ -165799,4 +165788,4 @@ "jpmedley" ] } -} +} \ No newline at end of file diff --git a/files/en-us/web/api/response/index.html b/files/en-us/web/api/response/index.html index a78949b557e26a2..35e8cbd2f0f3bc5 100644 --- a/files/en-us/web/api/response/index.html +++ b/files/en-us/web/api/response/index.html @@ -42,8 +42,6 @@

Properties

The type of the response (e.g., basic, cors).
{{domxref("Response.url")}} {{readonlyinline}}
The URL of the response.
-
{{domxref("Response.useFinalURL")}}
-
A boolean indicating whether this is the final URL of the response.

Body Interface Properties

diff --git a/files/en-us/web/api/response/usefinalurl/index.html b/files/en-us/web/api/response/usefinalurl/index.html deleted file mode 100644 index 4deeaaf2da279a5..000000000000000 --- a/files/en-us/web/api/response/usefinalurl/index.html +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: Response.useFinalURL -slug: Web/API/Response/useFinalURL -tags: -- API -- Experimental -- Fetch -- Obsolete -- Property -- Reference -- Response -- useFinalURL ---- -
{{APIRef("Fetch")}}{{deprecated_header}}
- -

The useFinalURL property of the {{domxref("Response")}} - interface contains a boolean stating whether this is the final URL of the response.

- -
-

This property applies only to ServiceWorkers. In other contexts - it will return undefined.

-
- -

Syntax

- -
var isfinalURL = Response.useFinalURL;
- -

Value

- -

A {{domxref("Boolean")}} indicating whether or not the URL is final rather than a - redirect.

- -

Example

- -

Consider a script residing in page index.html:

- -
fetch('/test').then((r) => console.log(r.url))
- -

test.html is being controlled by the service worker sw.js: -

- -
onfetch = (e) => {
-  e.respondWith(fetch('/page2').then((r) => {
-    r.usefinalURL = true;
-    return r;
-  })
-}
- -

The output will be /page2 and not /test in - index.html, since setting the usefinalURL means that the - response's URL is not set to request's URL.

- -

Browser compatibility

- -

{{Compat("api.Response.useFinalURL")}}

- -

See also

- -