aboutsummaryrefslogtreecommitdiff
path: root/files/ja/orphaned/web/api/response
diff options
context:
space:
mode:
authorMDN <actions@users.noreply.github.com>2021-03-12 00:26:31 +0000
committerMDN <actions@users.noreply.github.com>2021-03-12 00:26:31 +0000
commit13b1bd338b6f1443491b4e7889554868d74784f6 (patch)
tree43a05405db6bed752b1ebd53f183f55ca9c4e840 /files/ja/orphaned/web/api/response
parentbed4d75a6446747baec67da8889d1aabd5511e2a (diff)
downloadtranslated-content-13b1bd338b6f1443491b4e7889554868d74784f6.tar.gz
translated-content-13b1bd338b6f1443491b4e7889554868d74784f6.tar.bz2
translated-content-13b1bd338b6f1443491b4e7889554868d74784f6.zip
[CRON] sync translated content
Diffstat (limited to 'files/ja/orphaned/web/api/response')
-rw-r--r--files/ja/orphaned/web/api/response/usefinalurl/index.html61
1 files changed, 61 insertions, 0 deletions
diff --git a/files/ja/orphaned/web/api/response/usefinalurl/index.html b/files/ja/orphaned/web/api/response/usefinalurl/index.html
new file mode 100644
index 0000000000..06251f6c71
--- /dev/null
+++ b/files/ja/orphaned/web/api/response/usefinalurl/index.html
@@ -0,0 +1,61 @@
+---
+title: Response.useFinalURL
+slug: orphaned/Web/API/Response/useFinalURL
+tags:
+ - API
+ - Experimental
+ - Fetch
+ - Obsolete
+ - Property
+ - Reference
+ - Response
+ - useFinalURL
+translation_of: Web/API/Response/useFinalURL
+original_slug: Web/API/Response/useFinalURL
+---
+<div>{{APIRef("Fetch")}}{{obsolete_header}}</div>
+
+<p>{{domxref("Response")}} インターフェイスの <strong><code>useFinalURL</code></strong> プロパティには、これが response の最終URLかどうかを示すbook値が含まれています。</p>
+
+<div class="note">
+<p>このプロパティは <a href="/en-US/docs/Web/API/ServiceWorker_API">ServiceWorkers</a> にのみに適用されます。他のコンテキストの場合、 <code>undefined</code> を返します。</p>
+</div>
+
+<h2 id="構文">構文</h2>
+
+<pre class="syntaxbox notranslate">var <var>isfinalURL</var> = <var>Response</var>.useFinalURL;</pre>
+
+<h3 id="値">値</h3>
+
+<p>URLがリダイレクトでなく最終的なものかどうかを示す {{domxref("Boolean")}}</p>
+
+<h2 id="例">例</h2>
+
+<p>ページ <code>index.html</code> にあるスクリプトで考えてみます:</p>
+
+<pre class="brush: js notranslate">fetch('/test').then((r) =&gt; console.log(r.url))</pre>
+
+<p><code>test.html</code> は service worker <code>sw.js</code> によって制御されています:</p>
+
+<pre class="brush: js notranslate">onfetch = (e) =&gt; {
+ e.respondWith(fetch('/page2').then((r) =&gt; {
+ r.usefinalURL = true;
+ return r;
+ })
+}</pre>
+
+<p><code>usefinalURL</code> を設定すると、 response のURLが要求のURLに設定されないため、出力は <code>index.html</code> の <code>/test</code> ではなく <code>/page2</code> になります。</p>
+
+<h2 id="ブラウザーの互換性">ブラウザーの互換性</h2>
+
+
+
+<p>{{Compat("api.Response.useFinalURL")}}</p>
+
+<h2 id="関連項目">関連項目</h2>
+
+<ul>
+ <li><a href="/en-US/docs/Web/API/ServiceWorker_API">ServiceWorker API</a></li>
+ <li><a href="/en-US/docs/Web/HTTP/Access_control_CORS">HTTP access control (CORS)</a></li>
+ <li><a href="/en-US/docs/Web/HTTP">HTTP</a></li>
+</ul>