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 @@
basic
, cors
).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
.
var isfinalURL = Response.useFinalURL;- -
A {{domxref("Boolean")}} indicating whether or not the URL is final rather than a - redirect.
- -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.
{{Compat("api.Response.useFinalURL")}}
- -