1. 序論
現今の~browserは、利用者による入力や意図を見越して投機的に最適化する多様な技法を活用している。 それは、後続の~navi用に[ ~preconnectする / 資源を~prefetchする / 資源を~prerenderする ]ことにより,[ ~networking / 資源の処理 / 資源の具現化 ]における遅延の一部を隠すことを可能にする。 ◎ Modern browsers leverage a wide variety of speculative optimization techniques to anticipate user input and intent, which allows them to hide some of the networking, processing, and rendering latencies: preconnects, prefetching of resources, and prerendering of resources for subsequent navigation.
上の最適化のどれを起動するか決めるのは、概して[ 文書の[ ~markupと構造 ] / ~navi履歴 / 利用者の文脈 ]に基づく経験的な規則に基づく — 例: 機器の型 / 可用な計算~資源 / 可用な~memory資源 / ~network接続性 / 利用者~選好 / 等々。 これらの技法が成功したことは,立証されているが、[[ ~front-end/~back-end ]による生成 / ~web~appを成す資源の送達 ]について開発者が有する知識を活用すれば,更に改善できる。 ◎ The decision to initiate one or more of the above optimizations is typically based on heuristic rules based on document markup and structure, navigation history, and context of the user - e.g., type of device, available compute and memory resources, network connectivity, user preferences, and so on. These techniques have proven to be successful, but can be further improved by leveraging the knowledge a developer has about the front-end and back-end generation and delivery of the resources of a web application.
例えば~appは、次の資源~hintを~UAに供せる: ◎ For example, the application may provide the following resource hints to the user agent:
- 資源をどこから~fetchするかを与える,生成元~list。 ◎ The list of origins from which resources will be fetched.
- 次回に見込まれる[ 利用者~動作/~navi~target ] ◎ The next likely user action or navigation target, and\
- 次に挙げるものなどに基づいて要求されることになる資源 ⇒# 現在の頁や~appの状態 / 個々の利用者の履歴 / 集成された~session~data ◎ the resources that will be required, based on current page or application state, individual user history, or aggregated session data.
多くの~web~appは、様々な~prefetchする技法を,すでに活用している。 これには、必要になる前に `XMLHttpRequest^I を用いて~assetを~fetchして~cacheすることなども含まれる。 しかしながら,これらの実装は~appに特有であり、相互運用可能でない上に,~browserにより供される~primitiveと同じ~levelの処理能は供さない。 さらには,これらの実装は、~browser~logicと競合して,その結果による遅延-や不必要な資源~fetchにより,頁の総~処理能を~~落とすこともある。 ◎ Many web applications already leverage a variety of prefetching techniques. This includes, but is not limited to, using XMLHttpRequest to fetch and cache assets before they are needed. However, these implementations are application specific, are not interoperable, and do not provide the same level of performance as the browser-provided primitives. Worse, these implementations sometimes conflict with the browser logic and result in delayed or unnecessary resource fetches that degrade overall page performance.
この仕様は、 ~HTML `link$e 要素の[ `dns-prefetch$v, `preconnect$v, `prefetch$v, `prerender$v ]関係性を定義する。 これらの~primitiveは、[ ~UAが、頁~処理能を改善するために,[ どの生成元に接続して, どの資源を~fetchして前処理するべきか ]を決める処理- ]を,開発者や[ 資源を[ 生成-/送達- ]している~server ]が支援できるようにする。 ◎ This specification defines the dns-prefetch, preconnect, prefetch, and prerender relationships of the HTML Link Element (<link>). These primitives enable the developer, and the server generating or delivering the resources, to assist the user agent in the decision process of which origins it should connect to, and which resources it should fetch and preprocess to improve page performance.
2. 資源~hint
`資源~hint~link@ とは、[ ~UAにより[ 接続されるべき生成元 /~fetchされるべき資源 ]]を指示するために利用される~link関係性 — `dns-prefetch$v, `preconnect$v, `prefetch$v, `prerender$v — の総称である。 ◎ A resource hint link is a dns-prefetch, preconnect, prefetch, or prerender relationship that is used to indicate an origin or resource that should be connected to, or fetched, by the user agent.
`投機的~fetch@ とは、[ `prefetch$v / `prerender$v ]関係性を介して起動される~fetchの総称である。 ◎ A speculative fetch is a fetch initiated via a prefetch or prerender relationship.
2.1. `dns-prefetch^v
~link関係~型 `dns-prefetch@v は、[ 要求される資源を~fetchするために利用することになる生成元 ]を指示するために利用される — ~UAは、可能な限り早くに解決する~SHOULDである。 ◎ The dns-prefetch link relation type is used to indicate an origin that will be used to fetch required resources, and that the user agent SHOULD resolve as early as possible.
<link rel="`dns-prefetch$v" href="//example.com">
2.2. `preconnect^v
~link関係~型 `preconnect@v は、[ 要求される資源を~fetchするために利用することになる生成元 ]を指示するために利用される。 [ ~DNS検索, ~TCP~handshake, ~TLS折衝(任意選択) ]も含む,接続を早期に起動しておけば、~UAは,接続を確立する際の高い遅延~costを覆隠せるようになる。 ◎ The preconnect link relation type is used to indicate an origin that will be used to fetch required resources. Initiating an early connection, which includes the DNS lookup, TCP handshake, and optional TLS negotiation, allows the user agent to mask the high latency costs of establishing a connection.
<link rel="`preconnect$v" href="//example.com"> <link rel="`preconnect$v" href="//cdn.example.com" crossorigin>
`~preconnectを起動-@ するときは、所与の %要素 に対し次の手続きを走らせ~MUST: ◎ To initiate a preconnect, the user agent MUST run these steps:
- ~Assert: %要素 は `href$a 属性を有する 【この段はこの訳による補完】
- %文書 ~LET %要素 の`~node文書$
-
%~preconnect~URL ~LET %要素 の `href$a 属性の値を %文書 に`相対的に構文解析-$した`結果の~URL文字列$
【 この段の %文書 はこの訳による補完/推定。 原文は、過去の `HTML$r 仕様の 現在は廃された用語を参照していて,記述が整合していないので。 】
◎ Resolve the URL given by the href attribute. ◎ If that is successful, let preconnect URL be the resulting absolute URL, and\ - ~IF[ %~preconnect~URL ~EQ `~error^i ] ⇒ ~RET ◎ otherwise abort these steps.
- ~IF[ %~preconnect~URL の`~scheme$url ~NIN { `http^l, `https^l } ] ⇒ ~RET ◎ If preconnect URL's scheme is not one of "http" or "https" then abort these steps.
- %生成元 ~LET %~preconnect~URL の`生成元$url ◎ Let origin be preconnect URL's origin.
- %~CORS属性~状態 ~LET %要素 の `crossorigin$a 内容~属性の現在の状態 ◎ Let corsAttributeState be the current state of the element's crossorigin content attribute.
- %資格証 ~LET ~T ◎ Let credentials be a boolean value set to true.
- ~IF[ %~CORS属性~状態 ~EQ `Anonymous$st ]~AND[ %生成元 ~NEQ %文書 の`生成元$ ] ⇒ %資格証 ~SET ~F ◎ If corsAttributeState is Anonymous and origin is not equal to current Document's origin, set credentials to false.
- `接続を得る$( %生成元, %資格証 ) ◎ Attempt to obtain connection with origin and credentials.
~UAは、`~preconnectを起動-$する, および 可能なときは全部的な接続~handshake( 生成元に応じて,~HTTPならば~DNSと~TCP / ~HTTPSならば ~DNSと~TCPと~TLS )を遂行するよう試みる~SHOULDである — が、資源~拘束その他の事由に因り,~handshakeを部分的に遂行する( 生成元に応じて,~HTTPならば~DNSのみ / ~HTTPSならば ~DNSのみ, または~DNSと~TLS ), あるいは まるごと飛ばすことも許容される。 ◎ The user agent SHOULD attempt to initiate a preconnect and perform the full connection handshake (DNS+TCP for HTTP, and DNS+TCP+TLS for HTTPS origins) whenever possible, but is allowed to elect to perform a partial handshake (DNS only for HTTP, and DNS or DNS+TCP for HTTPS origins), or skip it entirely, due to resource constraints or other reasons.
生成元ごとの最適な接続~数は[ 折衝される~protocol / 利用者の現在の接続性~profile / 機器に可用な資源 / 大域的な接続~制限- / 他の文脈~特有な変数 ]に依存する。 よって、いくつの接続を~openするべきか決めるのは,~UAに委ねられる。 ◎ The optimal number of connections per origin is dependent on the negotiated protocol, users current connectivity profile, available device resources, global connection limits, and other context specific variables. As a result, the decision for how many connections should be opened is deferred to the user agent.
2.3. `prefetch^v
~link関係~型 `prefetch@v は、次回の~naviにより要求されるであろう資源を識別するために利用される — ~UAは、[ 未来に資源が要請され次第,より高速に応答を送達できる ]よう,~fetchする~SHOULDである。 ◎ The prefetch link relation type is used to identify a resource that might be required by the next navigation, and that the user agent SHOULD fetch, such that the user agent can deliver a faster response once the resource is requested in the future.
<link rel="`prefetch$v" href="//example.com/next-page.html" as="document" crossorigin="use-credentials"> <link rel="`prefetch$v" href="/library.js" as="script">
- ~UAは、応答に前処理を適用する~SHOULDでない。 また、現在の頁~文脈に対し,それを自動的に[ 実行-/適用- ]しては~MUST_NOT。 ◎ The user agent SHOULD NOT apply preprocessing on the response and MUST NOT automatically execute or apply it against the current page context.
- `as$a 属性は、任意選択の属性であり, `PRELOAD$r に定義される要件に適合し~MUST。 ◎ The as attribute is an OPTIONAL attribute that must conform to requirements defined in [PRELOAD].
- `~CORS設定群~属性$ `crossorigin$a は、任意選択の属性であり、指定された資源の~CORS~policyを指示する。 ◎ The crossorigin CORS setting attribute is an OPTIONAL attribute that indicates the CORS policy of the specified resource.
注記: `as$a 属性を利用すれば、~appは — ~UAが~fetchingを最適化できるよう — 資源の行先になる文脈と通信できる。 例えば、要請~header, ~transport優先度, 等々を適切に設定するなど。 ◎ The as attribute can be used by the application to communicate the resource destination context, such that the user agent can optimize the fetching process - e.g. set appropriate request headers, transport priority, and so on.
2.4. `prerender^v
~link関係~型 `prerender@v は、次回の~naviに要求されるであろう資源を識別するために利用される — ~UAは、[ 未来に資源が要請され次第,より高速に応答を送達できる ]よう,~fetchして実行する~SHOULDである。 ◎ The prerender link relation type is used to identify a resource that might be required by the next navigation, and that the user agent SHOULD fetch and execute, such that the user agent can deliver a faster response once the resource is requested in the future.
<link rel="`prerender$v" href="//example.com/next-page.html">
~UAは、[ 必要とされる下位資源も~fetchして,それらを実行する ]ことにより,~HTML応答を前処理して~MAY(すなわち,頁を~prerenderする)。 ~prerenderする手続きを遂行するかどうか決めるのは、~UAに委ねられる。 ~UAは、次を行っても~MAY: ◎ The user agent MAY preprocess the HTML response by also fetching the necessary subresources and executing them (i.e. prerender the page). The decision for which prerendering steps are performed is deferred to the user agent. The user agent MAY:
- ~prerenderされた内容に割振る[ ~CPU / ~GPU /~memory ]資源を少なくする。 ◎ Allocate fewer CPU, GPU, or memory resources to prerendered content.
- 要請された~HTML資源が可視になるまで、一部の要請を遅延する — 例: ~mediaの~download, ~plugin内容, 等々。 ◎ Delay some requests until the requested HTML resource is made visible - e.g. media downloads, plugin content, and so on.
- 可用な資源が制限されている下では、起動されている~prerenderを防止する。 ◎ Prevent prerendering from being initiated when there are limited resources available.
- 要求される[ ~cost/資源 ]が高いときは、~prerenderするのを放棄する — 例: ~CPUや~memoryの使用量が高い, 高価な~data~access, 等々。 ◎ Abandon prerendering due to high cost or resource requirements - e.g. high CPU or memory usage, expensive data access, and so on.
-
~fetchされる内容の型や特質に因り,~prerenderするのを放棄する: ◎ Abandon prerendering due to the type or properties of the fetched content:
- ~targetは、冪等でない挙動を呈する場合 — 例:局所的な共用~storageに対する変異, [ `GET^M, `HEAD^M, `OPTION^M ]以外の~HTTP~methodを伴う `XMLHttpRequest$I 等々。 ◎ If the target exhibits non-idempotent behavior: mutations to shared local storage, XMLHttpRequest with a verb other than GET, HEAD, or OPTION, and so on.
- ~targetが利用者~入力 — 確認~dialog, 認証~prompt, ~alert, 等々 — を要求するような条件を誘発する場合。 ◎ If the target triggers a condition that requires user input: confirmation dialogs, authentication prompts, alerts, and so on.
上に挙げた処理~策は、網羅的ではない。 ~UAは、他の策を実装しても~MAY。 ◎ The above processing strategies are not an exhaustive list. The user agent may implement other strategies.
~UAは、`文書$を~prerenderするときは,[ `文書$の `visibilityState$m 取得子は `prerender^l を返す ]ようにし~MUST。 `PAGE-VISIBILITY$r ◎ When prerendering a document the user agent MUST set the document's visibilityState ([PAGE-VISIBILITY]) value to prerender.
注記: `prerender$v ~hintを利用すれば、~appは,次回に見込まれる~HTML~navi~targetを指示できる — ~UAは、指定された資源を~fetchした上で,~HTML応答として処理することになる。 適切な要請~headerを伴う他の内容型を~fetchする場合や, ~HTML前処理は欲されない場合、~appは `prefetch$v ~hintを利用できる。 ◎ The prerender hint can be used by the application to indicate the next likely HTML navigation target: the user agent will fetch and process the specified resource as an HTML response. To fetch other content-types with appropriate request headers, or if HTML preprocessing is not desired, the application can use the prefetch hint.
注記: 互換性を確保する, あるいは~prerenderする要請の成功~率を改善するためには、~target頁は,具現化され次第 Page Visibility ~APIを利用して,頁の可視性~状態を決定して、[ ~prerenderを放棄させ得るような動作(例: 冪等でない要請)/ 求められない副作用が誘発される(例: 表示される頁に先立って発火される解析~用~beacon) ]を避けるための適切な~logicを実装できる。 ◎ To ensure compatibility and improve the success rate of prerendering requests the target page can use the Page Visibility API to determine the visibility state of the page as it is being rendered and implement appropriate logic to avoid actions that may cause the prerender to be abandoned (e.g. non-idempotent requests), or unwanted side-effects from being triggered (e.g. analytics beacons firing prior to the page being displayed).
3. 処理-
3.1. 資源~hint~linkの~fetch法
`資源~hint~link$は、文書~markup内に指定されることも, ~HTTP `Link$h ~headerを介して供されることも, 文書に動的に追加されたり除去されることもある — あるいは、されてもよい。 ◎ The resource hint link's may be specified in the document markup, MAY be provided via the HTTP Link header, and MAY be dynamically added to and removed from the document.
Link: <https://widget.com>; rel=`dns-prefetch$v Link: <https://example.com>; rel=`preconnect$v Link: <https://example.com/next-page.html>; rel=`prerender$v; Link: <https://example.com/logo-hires.jpg>; rel=`prefetch$v; as=image;
<link rel="`dns-prefetch$v" href="//widget.com"> <link rel="`preconnect$v" href="//cdn.example.com"> <link rel="`prerender$v" href="//example.com/next-page.html"> <link rel="`prefetch$v" href="//example.com/logo-hires.jpg" as="image">
var %hint = document.createElement("link"); %hint.rel = "prefetch"; %hint.as = "document"; %hint.href = "/article/part3.html"; document.head.appendChild(%hint);
[ ~hostへ接続する / 指定された`資源を得る$ ]適切な時機は: ◎ The appropriate times to connect to a host, or obtain the specified resource are:
- ~UAが `RFC5988$r を~supportしている場合には、 `Link$h ~headerを介して指定される`資源~hint~link$を処理するとき。 ◎ When the user agent that supports [RFC5988] processes resource hint link specified via the Link HTTP header.
- `資源~hint~link$を与える `link$e 要素が`文書の中へ挿入された$とき。 ◎ When the resource hint link's link element is inserted into a document.
- `link$e 要素が`文書~内にある$下で,要素~上に`資源~hint~link$が作成されたとき。 ◎ When the resource hint link is created on a link element that is already in a Document.
- `資源~hint~link$を与える `link$e 要素が`文書~内にある$下で、要素の `href$a 属性~値が変更されたとき。 ◎ When the href attribute of the link element of an resource hint link that is already in a Document is changed.
~UAは、現在の~navi文脈~用の資源との競合を最小化するためとして,`投機的~fetch$による~fetchを遅延して~MAY。 ◎ The user agent MAY delay the fetch of speculative fetch to minimize resource contention for the current navigation context.
`preconnect$v / `投機的~fetch$ を取消すかどうか決めるのは、~UAに委ねられる — ~UAは、最適化が中止されるべきである[ とき, 場合 ]を[ 局所的~文脈 その他の~signal ]を利用して決定して~MAY: ◎ The decision to cancel a preconnect or speculative fetch is deferred to the user agent, which MAY use local context and other signals to determine if and when the optimization should be aborted:
- ~UAは、[ `資源~hint~link$を与える `link$e 要素~上の `href$a 属性 ]が[ 除去された / その値が空~文字列に設定された ]ときには、要請を中止する~SHOULDである。 ◎ The user agent SHOULD abort the request if the href attribute on the link element of an resource hint link is removed, or its value is set to an empty string.
- ~UAは、`資源~hint~link$ を介して起動された要請が,複数~naviにまたがって継続するのを許容する~SHOULDである。 しかしながら,[ そのような要請は,新たな行先には要求されない ]ものと決定したときには、それを取消しても~MAY — 受動的な資源の~prefetch法 を見よ。 ◎ The user agent SHOULD allow the requests initiated via the resource hint link to continue across navigations. However, the user agent MAY cancel these requests once it determines that they are not required by the new destination - see .
次回の~naviに要求され得る資源~fetchは、現在の~navi文脈における処理能に負の影響0を及ぼし得る — [ ~CPU, ~GPU, ~memory, ~network資源 ]用の追加の競合に因り。 これに取組むため、~UAは,そのような競合を[ 抑制する/排する ]ような~logicを実装する~SHOULDである: ◎ Resource fetches that may be required for the next navigation can negatively impact the performance of the current navigation context due to additional contention for the CPU, GPU, memory, and network resources. To address this, the user agent SHOULD implement logic to reduce and eliminate such contention:
- 次回の~naviに要求される資源~fetchの優先度は、相対的に低くされる~SHOULDであり,現在の~navi文脈に要求される資源~fetch[ を阻止する/に干渉する ]~SHOULDでない。 ◎ Resource fetches required for the next navigation SHOULD have lower relative priority and SHOULD NOT block or interfere with resource fetches required by the current navigation context.
-
次回の~naviに要求される資源~fetchを起動する最適な時機は、[ 折衝された~transport~protocol, 利用者の現在の接続性~profile, 機器に可用な資源, その他の文脈~特有な変数 ]に依存する。 この最適な時機を決定するのは~UAに~~委ねられる — 例えば,~UAは、次のようにしても~MAY: ◎ The optimal time to initiate a resource fetch required for the next navigation is dependent on the negotiated transport protocol, users current connectivity profile, available device resources, and other context specific variables. The user agent is left to determine the optimal time at which to initiate the fetch - e.g. the user agent\
- 他の~downloadをすべて終えるまで待機することにする。 ◎ MAY decide to wait until all other downloads are finished, or\
- 要請を低い優先度で~pipelineすることを選ぶ — 折衝された~protocolが,必要とされる~primitiveを~supportするならば。 ◎ MAY choose to pipeline requests with low priority if the negotiated protocol supports the necessary primitives.\
- 資源~拘束, 利用者~選好, その他の要因に因り,~fetchを起動するのを任意選択で外す。 ◎ Alternatively, the user agent MAY opt-out from initiating the fetch due to resource constraints, user preferences, or other factors.
3.2. `load^et, `error^et ~event
~UAは、[ `preconnect$v / `投機的~fetch$ ]により起動された要請が未終了であっても、それに因り文書の`~load~eventを遅延-$しては~MUST_NOT。 ◎ The user agent MUST NOT delay the load event of the document due to outstanding preconnect or speculative fetch initiated requests.
資源~hintが実行されるかどうか, および その場合に処理を[ 全部的/部分的 ]に適用するかどうか決めるのは、~UAに委ねられる。 よって、[ `load^et / `error^et ]~eventが要素に向けて発火されることは,保証されないし、発火されても,処理が全部的に適用されることは保証されない。 しかしながら,~UAは、可能ならこれらの~eventのうち適切な方を発火して,[ ~appが,どの~hintがいつ実行されるか追跡できる ]ようにする~SHOULDである。 ◎ The decision on whether a resource hint is executed, and if so, whether full or partial processing is applied is deferred to the user agent. As a result, element-level load and error JavaScripts events are not guaranteed to fire, and if they do, do not guarantee that full processing was applied. However, the user agent SHOULD fire the appropriate load and error events when possible, to allow the application to track which hints were executed and when.
4. 利用事例
4.1. 動的な要請~URL ( `preconnect^v )
全部的な資源~URLは、~UAが頁を構築するまで既知でないこともある — 例: 条件付き読込み~logic, ~UAの適応力, 等々。 しかしながら,~fetchされることになる資源の生成元は、[ 開発者/ 応答を生成している~server ]にとっては,事前に既知なことは多い。 そのような事例では、 `preconnect$v ~hintを利用して,早期に接続~handshakeを起動できる: ~UAは、資源~URLが決定されたとき,すぐに — 接続~折衝により先ず阻止されることなく — 要請を配送できるようになる。 ◎ The full resource URL may not be known until the page is being constructed by the user agent - e.g. conditional loading logic, UA adaptation, etc. However, the origin from which one or more of these resources will be fetched is often known ahead of time by the developer or the server generating the response. In such cases, a preconnect hint can be used to initiate an early connection handshake such that when the resource URL is determined, the user agent can dispatch the request without first blocking on connection negotiation.
4.2. ~redirectの匿名化-法( `preconnect^v )
利用者を最終的な行先へ送る前に、[ 解析 / ~malware保護 / ~referrerを匿名化する ]ために,~redirect~serviceに依拠する~siteは多い。 行先は事前に既知なので, `preconnect$v ~hintを利用すれば、行先~生成元との接続~handshakeを,~redirectの処理と並列的に起動できる(私的な情報は露わにすることなく)。 これは、~redirectによる遅延を覆隠して,最終的な行先への~navi時間を抑制する。 ◎ Many sites rely on redirect services for analytics, malware protection, and to anonymize the referrer before sending the user to the final destination. Because the destination is known ahead of time, a preconnect hint can be used to initiate the connection handshake with the destination origin (without revealing any private information) in parallel with the processing of the redirect - this masks the redirect latency and reduces navigation time to final destination.
4.3. 投機的な資源の~prefetch法( `prefetch^v )
`prefetch$v ~hintを利用すれば、[ 内容, 構造, 解析, その他の~signal ] — 例: 見込みが高い探索~結果, 一連の頁に分けられた内容や 段階を踏んでいく流れ, 集成された解析, 利用者ごとの挙動, 等々 — に基づく,次回の~naviについての~app特有な知識を活用して、~prefetch策を実装できる。 ◎ The prefetch hint can be used to implement a prefetch strategy that leverages app-specific knowledge about the next navigation based on content, structure, analytics, or other signals - e.g. high-likelihood search results, paginated content or step-driven flows, aggregated analytics or per-user behavior, and so on.
例えば画像展示は、利用者から次回に要請されると見込まれる写真や頁についての知識を有し得る。 ~appは、次回の~naviが誘発される前に,要求される資源(個々の写真 / 必須の資源 / 全部的な頁)を~fetchし始めるよう~UAに依頼して,利用者~体験を改善できる。 ◎ For example, an image gallery may have knowledge about the likelihood of the next photo or page that may be requested by the user. To provide an improved experience the application can ask the user agent to begin fetching required resources (individual photos, critical resources, or the full page) before the next navigation is triggered.
~appは、利用している各~資源に対し, `prefetch$v 関係を指定して,上の挙動を達成できる。 ◎ To achieve the above behavior the application can specify one or more prefetch relations and optionally specify the probability (via pr attribute) of each resource being used.
4.4. 受動的な資源の~prefetch法( `prefetch^v )
`prefetch$v 利用すれば、利用者が次へ向かう所についての知識を活用するような, “受動的~prefetch策” を実装できる — ~appは、~navi要請と並列的に,必須の資源を~prefetchし始められるようにする。 ◎ The prefetch can be used to implement a "reactive prefetch strategy" that leverages the knowledge of where the user is heading next and enables the application to begin prefetching critical resources in parallel with the navigation request.
~appは、利用者/~appから生成される~clickその他の~eventを~listenして,次回の~naviに要求される必須の資源に関連する `prefetch$v 関係を動的に挿入することで、上の挙動を達成できる。 ~UA側においては、~hintされた資源を~navi要請と並列的に~fetchして,必須の資源より早く可用にできる。 ◎ To achieve the above behavior the application can listen for click, or other user and application generated events, and dynamically insert relevant prefetch relations for critical resources required by the next navigation. In turn, the user agent can fetch the hinted resources in parallel with the navigation request, making the critical resources available sooner.
この策は、[ `prefetch$v 関係を介して起動された要請が,複数の~naviにまたがって持続化する ]のを許容する特色機能を,可能化する。 ◎ The enabling feature of this strategy is that requests initiated via prefetch relation may be allowed to persist across navigations.
4.5. ~prerender法( `prerender^v )
`prerender$v ~hintを利用すれば、利用者が~naviを誘発したとき瞬時の~navi体験を可能化できるよう,行先~頁を~prerenderできる。 ◎ The prerender hint can be used to prerender the destination page, enabling an instant navigation experience once the user triggers the navigation.
~appは、各が行先~頁(~HTML資源)を指すような `prerender$v 関係を 1 つ以上~指定して,瞬時の~navi体験を送達できる。 ~UA側において、瞬時の~naviを送達する — すなわち,頁を “~prerender” する — ためとして,そのような~HTML文書を[ ~fetchして処理する, その下位資源も~fetchする, その他の作業を遂行する ]ようにしても~MAY。 ◎ To deliver an instant navigation experience the application can specify one or more prerender relations, each of which points to a destination page (an HTML resource). In turn, the user agent may fetch and process the HTML document, fetch its subresources, and perform other work to deliver an instant navigation - i.e. "prerender" the page. ◎ (原文の削除漏れ) Finally, because prerendering may require a lot of resources, the application can specify the probability (via pr attribute) of each target to help the user agent deliver the best user experience.
5. ~securityと~privacy
`資源~hint~link$の利用-は、[ 現在の頁, 利用者の活動 ]両者についての情報を公開するような,新たな手段を供し得る。 [ ~secure, 平文 ]両~接続とも、例えば,[[ ~prefetch/~prerender ]された資源の内容 / 接続を確立する間に公開される[ ~DNS / ~IP / ~hostname ]情報 ]を観測することにより、そのような要請を起動している頁についての情報に加え, 資源~hintが動的に利用される所では利用者の活動も,露わにされ得る。 ◎ The use of resource hints can provide new means to expose information about both the current page and user's activity on it. For example, observing the content of prefetched or prerendered resources, or observing the DNS, IP, and hostname information exposed during connection establishment, both for secure and plain-text connections, can reveal information about the page initiating such requests, and where dynamic resource hints are used, user's activity on it.
これらの~risk一部を軽減するため、~UAは,次をし~MUST: ◎ To mitigate some of the above risks, the user agent MUST:
- `資源~hint~link$が指す内容を,`随意に阻止-可能な内容$ `MIXED-CONTENT$r として扱う。 ◎ Treat resource hint link's as Optionally-blockable Content, as defined by [MIXED-CONTENT].
- 楽観的な資源~fetching用に、関連する 処理の複雑化に際しての推奨 `CSP3$r を適用する。 ◎ Apply relevant Processing Complications recommendations for optimistic resource fetching, as defined by [CSP3].
- `資源~hint~link$が指す内容に,関連する~referrer~policy制約 `REFERRER-POLICY$r を適用する。 ◎ Apply relevant Referrer policy restrictions for resource hint link's, as defined by [REFERRER-POLICY].
加えて,~UAは、`資源~hint~link$の利用を制御する設定群を利用者に供して~MAY ◎ Additionally, the user agent MAY provide user setting to control the use of resource hints.
~site作者は、必要とされる予防策をとる~SHOULDである — `MIXED-CONTENT$r, `CSP3$r, `REFERRER-POLICY$r による関連する各種~policyを指定して、~UAが,`資源~hint~link$を処理するに先立って,それらを登録して適用できるようにするため: ◎ The site author SHOULD take necessary precautions to specify the relevant [MIXED-CONTENT], [CSP3], and [REFERRER-POLICY] policies to allow the user agent to register and apply them prior to processing a resource hint link:
- `資源~hint~link$を~HTML~markupを介して供する場合、事前に,関連する `meta^e による~policyが宣言される~SHOULDである — 例: ~CSP用の `meta^e 推奨 を見よ。 ◎ If resource hint link is provided via HTML markup, then the relevant <meta> policies SHOULD be declared ahead of them - e.g. see <meta> recommendations for CSP.
- `資源~hint~link$は `Link$h ~HTTP応答~headerを介して供される場合、関連する~policyも~HTTP応答~headerとして送達されるべきである — 例: ~CSP用の 処理の複雑化 を見よ。 ◎ If resource hint link is provided via the Link HTTP response header, then the relevant policies should also be delivered as an HTTP response header - e.g. see Processing Complications for CSP.
6. 適合性
この仕様が適合性を課す対象は、~UAのみである。 ◎ There is only one class of product that can claim conformance to this specification: a user agent.
7. ~IANA考慮点
以下に挙げる各種~link関係~型は、 `RFC5988$r, 6.2.1 節により,~IANAにより登録された: ◎ The link relation types below have been registered by IANA per Section 6.2.1 of [RFC5988]:
7.1. `dns-prefetch^v ~link関係~型
- 関係~名
- `dns-prefetch$v
- 記述
- [[[[[ 当の~link文脈~用に要求される資源 ]を~fetchする ]ために利用する ]ことになる生成元 ]を指示する ]ために利用される — ~UAは、可能な限り早くに解決するものとする。 ◎ Used to indicate an origin that will be used to fetch required resources for the link context, and that the user agent ought to resolve as early as possible.
- 参照
- この仕様。 ◎ W3C Resource Hints Specification (https://www.w3.org/TR/resource-hints/)
7.2. `preconnect^v ~link関係~型
- 関係~名
- `preconnect$v
- 記述
- [[[[[ 当の~link文脈~用に要求される資源 ]を~fetchする ]ために利用する ]ことになる生成元 ]を指示する ]ために利用される — ~UAには、接続を[ ~DNS検索, ~TCP~handshake, ~TLS折衝(任意選択) ]を含め 早期に起動することで,接続を確立する際の高い遅延~costを覆隠すことが許容される。 ◎ Used to indicate an origin that will be used to fetch required resources for the link context. Initiating an early connection, which includes the DNS lookup, TCP handshake, and optional TLS negotiation, allows the user agent to mask the high latency costs of establishing a connection.
- 参照
- この仕様。 ◎ W3C Resource Hints Specification (https://www.w3.org/TR/resource-hints/)
7.3. `prefetch^v ~link関係~型
- 関係~名
- `prefetch$v
- 記述
- ~prefetch~link関係~型は、[ 次回の~naviに際して,当の~link文脈から要求されるであろう資源 ]を識別するために利用される — ~UAは、[ 未来に資源が要請され次第,より高速に応答を送達できる ]よう,~fetchするものとする。 ◎ The prefetch link relation type is used to identify a resource that might be required by the next navigation from the link context, and that the user agent ought to fetch, such that the user agent can deliver a faster response once the resource is requested in the future.
- 参照
- この仕様。 ◎ W3C Resource Hints Specification (https://www.w3.org/TR/resource-hints/)
7.4. `prerender^v ~link関係~型
- 関係~名
- `prerender$v
- 記述
- [ 次回の~naviに際して,当の~link文脈から要求されるであろう資源 ]を識別するために利用される — ~UAは、[ 未来に資源が要請され次第,より高速に応答を送達できる ]よう,~fetchして実行するものとする。 ◎ Used to identify a resource that might be required by the next navigation from the link context, and that the user agent ought to fetch and execute, such that the user agent can deliver a faster response once the resource is requested in the future.
- 参照
- この仕様。 ◎ W3C Resource Hints Specification (https://www.w3.org/TR/resource-hints/)