1. 序論
~INFORMATIVE~web~appの処理能~特性の測定は、~web~appをより高速にするために重要な側面になる。 `JSMEASURE$r などの, JavaScript に基づく仕組みは、~app内における利用者~遅延の測定~用の包括的な~~手段を供せる一方で、多くの事例で,それらは端点間における遅延の完全なあるいは詳細な様相を供せない。 例えば、次の JavaScript は、~pageが全部的に~loadされるまでの時間を,ごく素朴に測定しようと試みる: ◎ Accurately measuring performance characteristics of web applications is an important aspect of making web applications faster. While JavaScript-based mechanisms, such as the one described in [JSMEASURE], can provide comprehensive instrumentation for user latency measurements within an application, in many cases, they are unable to provide a complete or detailed end-to-end latency picture. For example, the following JavaScript shows a naive attempt to measure the time it takes to fully load a page:
<html>
<head>
<script type="text/javascript">
var start = new Date().getTime();
function onLoad() {
var now = new Date().getTime();
var latency = now - start;
alert("page loading time: " + latency);
}
</script>
</head>
<body onload="onLoad()">
<!- ~page本体の内容… -->
</body>
</html>
上の~scriptは head ~tag内の最初の JavaScript コードが実行されて以降から,~pageが~loadされるまでの時間は計算するが、~serverから~pageを得るために要した時間や, ~pageの初期化 lifecycle についての情報は与えない。 ◎ The above script calculates the time it takes to load the page after the first bit of JavaScript in the head is executed, but it does not give any information about the time it takes to get the page from the server, or the initialization lifecycle of the page.
この仕様は、文書の~naviに関係する高解像度の処理能~計量~dataを格納する/取得するための, `PERFORMANCE-TIMELINE-2$r に関与する `PerformanceNavigationTiming$I ~interfaceを定義する。 `PerformanceNavigationTiming$I ~interfaceは `HR-TIME-2$r を利用するので、すべての時刻値は, `Window^I ~objの`時刻起点$を~~基準に計測される。 【したがって、 `PerformanceNavigationTiming^I ~interfaceが返す`時刻値$ 0 は,`時刻起点$を表すことになる。】 ◎ This specification defines the PerformanceNavigationTiming interface which participates in the [PERFORMANCE-TIMELINE-2] to store and retrieve high resolution performance metric data related to the navigation of a document. As the PerformanceNavigationTiming interface uses [HR-TIME-2], all time values are measured with respect to the time origin of the Window object.
例えば,~HTTP応答の終了が~naviの開始から 100ms 後であったとするなら、 `PerformanceNavigationTiming$I の~dataは次の様になるであろう: ◎ For example, if we know that the response end occurs 100ms after the start of navigation, the PerformanceNavigationTiming data could look like so:
startTime: 0.000 // ~navi要請の開始~時刻 responseEnd: 100.000 // 高解像度による,最後に受信された~byteの時刻
文書の~naviに関係する正確な計時~dataを得るために, `PerformanceNavigationTiming$I ~interfaceを用いる例を次の~scriptに示す: ◎ The following script shows how a developer can use the PerformanceNavigationTiming interface to obtain accurate timing data related to the navigation of the document:
<script> function showNavigationDetails() { /* 最初の~entryを取得する ◎ Get the first entry */ const [%entry] = performance.getEntriesByType("navigation"); /* 結果を開発者~console内に表の~~形で示す ◎ Show it in a nice table in the developer console */ console.table(%entry.toJSON()); </script> <body onload="showNavigationDetails()">
(結果は console ではなく,ここに表示される)【 Level 1 実装~用のものもある 】
2. 各種用語
【 以下、この節の他の内容は W3C 日本語訳 共通ページ, 次の下位節に委譲 】 ◎ The construction "a Foo object", where Foo is actually an interface, is sometimes used instead of the more accurate "an object implementing the interface Foo. ◎ The term "navigation" refers to the act of navigating. ◎ The term current document refers to the document associated with the Window object's newest Document object. ◎ The term JavaScript is used to refer to ECMA262, rather than the official term ECMAScript, since the term JavaScript is more widely known. [ECMASCRIPT]
この仕様を通して、時刻は 文書の~naviの開始を起点としてミリ秒~単位で計測されるものとする。 例えば,文書の~naviの開始は、時刻 0 で生じる。 語 “〜の時刻” は、文書の~naviの開始から その時点までに経過した,ミリ秒数による時刻を指す。 この,時刻の定義は、 `HR-TIME-2$r による。 ◎ Throughout this work, all time values are measured in milliseconds since the start of navigation of the document. For example, the start of navigation of the document occurs at time 0. The term current time refers to the number of milliseconds since the start of navigation of the document until the current moment in time. This definition of time is based on [HR-TIME-2] specification.
【この訳に固有の表記規約】
簡潔に記すため、次の非公式な用語を導入する:
- `~redirect等@ とは、~HTTP~redirect応答または(他の~protocolにおける) それに等価なもの (応答)を指す総称である。
- `GET 等@ とは、~HTTP GET 要請または(他の~protocolにおける) それに等価なもの を指す総称である。
-
`時刻値@ (あるいは `所要時間@ )とは、何らかの時刻(あるいは時間~差)を表現する `DOMHighResTimeStamp$I 型~値を意味する。
“`時刻値$ %t ” という表記は,値 %t をとる`時刻値$を意味する。 また、 “〜した時刻値(〜の時刻値)”, という表記は, “〜した時刻(〜の時刻)を表現する`時刻値$” の略記である。
- `~unload~event@ を開始した/完了した時点は、[ 文書の~unload法 / 文書の~unload手続き ]の前後を指すか,これらの中で `unload^et ~eventを発火する前後を指す。 (原文の記述からは、この “event” が~event~objを表すのか “~~出来事” を表すのかはっきりしないので、ここに集約して定義している。 意図的に曖昧にされているのかもしれない。)
廃用~節( Level 1 )で原文が参照する~HTTP用語は,過去の `RFC2616$r を参照しているが、この訳では,それに代わる改訂を成す一連の仕様( `RFC7230$r 他, またはその和訳)を参照することにする。
4. 処理
4.1. 処理~model
-
~IF[ 当の`~navi$は 次のいずれかの事由により中止された ] ⇒ ~RET ◎ If the navigation is aborted for any of the following reasons, abort these steps.
- `閲覧~文脈~sandbox化( ~navi )~flag$により ◎ The navigation is aborted due to the sandboxed navigation browsing context flag,\
- `閲覧~文脈~sandbox化( 非~利用者~作動化~top-level~navi )~flag$により ◎ the sandboxed top-level navigation without user activation browsing context flag or\
- `閲覧~文脈~sandbox化( 利用者~作動化~top-level~navi )~flag$により ◎ the sandboxed top-level navigation with user activation browsing context flag,\
- 当の`閲覧~文脈$を~navigateする試みがすでに存在する ◎ a preexisting attempt to navigate the browsing context, or\
- 利用者が~naviを取り消した ◎ the user canceling the navigation.
- ~naviは~page内の`素片識別子により生じた$ ◎ The navigation is caused by fragment identifiers within the page.
- ~navi先の資源は 何らかの種類の~inline内容により処理されている ◎ The new resource is to be handled by some sort of inline content.
- ~navi先の資源は `閲覧~文脈$に影響しない仕組みを利用して処理されている ◎ The new resource is to be handled using a mechanism that does not affect the browsing context.
- 利用者が前の文書の`~unloadを拒否-$した ◎ The user refuses to allow the document to be unloaded.
-
`~objの作成-@i:
%T ~LET 新たな `PerformanceNavigationTiming$I ~obj — 以降に現れる[ この~interface, この~interfaceが継承する~interface ]の属性は、すべて %T 上のそれを表すとする ◎ Create a new PerformanceNavigationTiming object and\
- %T を`処理能~entry~buffer$に追加する ◎ add it to the performance entry buffer.
- `name$m ← `document^l ◎ Set name to the DOMString "document".
- `entryType$m ← `navigation^l ◎ ↓
- `initiatorType$m ← `navigation^l ◎ Set entryType and initiatorType to the DOMString "navigation".
- `startTime$m ← `時刻値$ 0 ◎ Set startTime to a DOMHighResTimeStamp with a time value of zero,\
- `nextHopProtocol$m ← 空 `DOMString^I ◎ and nextHopProtocol to the empty DOMString.
-
~IF[ 現在の~navi種別はまだ設定されていない 【この条件は何を意味する?】 ] ⇒ `type$m ~SET ~naviがどう開始されたかに応じて,次で与えられる~navi種別 ◎ Record the current navigation type in type if it has not been set:
- 次のいずれか[ ~link-click, ~UAの~address-barへの~URL手入力, ~form提出, `location.reload()$m ~method以外の~script演算を通した初期化 ]により開始された場合 ⇒ `navigate$l ◎ If the navigation was started by clicking on a link, or entering the URL in the user agent's address bar, or form submission, or initializing through a script operation other than the location.reload() method, let the navigation type be the DOMString "navigate".
- [ `meta refresh$ の結果, または `location.reload()$m ~method ]または他の等価な動作により開始された場合 ⇒ `reload$l ◎ If the navigation was started either as a result of a meta refresh, or the location.reload() method, or other equivalent actions, let the navigation type be the DOMString "reload".
- `履歴の辿り$の結果,開始された場合 ⇒ `back_forward$l ◎ If the navigation was started as a result of history traversal,\
- ( `unloadEventStart$m, `unloadEventEnd$m ) ~SET ( 0, 0 ) ◎ let the navigation type be the DOMString "back_forward".
-
~IF[ 前の文書~資源は`計時許可~検査$に合格した ]:
- `unloadEventStart$m ~SET 前の文書の`~unload~event$の直前の時刻
- `unloadEventEnd$m ~SET 前の文書の`~unload~event$を完了した直後の時刻
- %workerStart ~LET 0
-
~IF[ ~navi~URLに合致する `~service-worker登録$ %worker はある ]:
- ~IF[ %worker はすでに可用である(`作動中の~worker$である) ] ⇒ %workerStart ~SET ~UAが %worker に向けて `名前~fetch_evの~eventを発火-$した直前の時刻
- ~ELSE ⇒ %workerStart ~SET ~UAが %worker を`走らす$直前の時刻
- `workerStart$m ~SET %workerStart
-
`~fetch開始@i:
- %fetchStart ~SET 0
- ~IF[ 新たな資源の~fetchは `GET 等$ により行われた ] ⇒ %fetchStart ~SET ~UAが`関連する~app~cache$を検査する直前の時刻
- ~ELSE ⇒ %fetchStart ~SET ~UAが資源の`~fetching$を開始する直前の時刻
- ( `fetchStart$m, `domainLookupStart$m, `domainLookupEnd$m, `connectStart$m, `connectEnd$m ) ~SET ( %fetchStart, %fetchStart, %fetchStart, %fetchStart, %fetchStart )
- `name$m ~SET 現在の文書の`~URL$doc【を直列化した結果】 ◎ Set name to a DOMString value of the address of the current document.
- ~IF[ 資源は( `~HTTP~cache$ `RFC7234$r も含めた)`関連する~app~cache$や局所~資源から~fetchされる ] ⇒ ~GOTO `要請~開始$i ◎ If the resource is fetched from the relevant application cache or local resources, including the HTTP cache [RFC7234], go to request-start-step.
-
`~domain検索@i:
- ~IF[ ~domain検索は要求されていない ] ⇒ ~GOTO `接続-開始$i ◎ If no domain lookup is required, go to connect-start-step.\
- `domainLookupStart$m ~SET ~UAが~domain名~検索を開始する直前の時刻 ◎ Otherwise, immediately before a user agent starts the domain name lookup, record the time as domainLookupStart.
- ~IF[ ~domain検索に成功しなかった ] ⇒ ~RET — ~UAは成功するまでに複数回の再試行が必要になり得る ◎ ↓
- `domainLookupEnd$m ~SET ~domain名~検索に成功した直後の時刻 ◎ Record the time as domainLookupEnd immediately after the domain name lookup is successfully done. A user agent MAY need multiple retries before that. If the domain lookup fails, abort the rest of the steps.
-
`接続-開始@i:
- ~IF[ 資源の~fetchに持続的~transport接続が利用されている ] ⇒ ( `connectStart$m, `connectEnd$m ) ~SET ( `domainLookupEnd$m, `domainLookupEnd$m )
-
~ELSE:
- `connectStart$m ~SET ~serverへの接続を起動する直前の時刻
- ~IF[ ~serverまたは~proxyへの接続を確立できなかった ] ⇒ ~RET — ~UAは確立される前に複数回の再試行が必要になり得る。
- `connectEnd$m ~SET ~serverまたは~proxyへの接続が確立された直後の時刻
- `nextHopProtocol$m ~SET 接続に利用される `ALPN Protocol ID$x
- `secureConnectionStart$m ~SET 0 ◎ ↓
- ~IF[ 保安的~transportが利用されている ] ⇒ `secureConnectionStart$m ~SET ~UAが接続を保安化する~handshake処理-を開始する直前の時刻 ◎ A user agent MUST also set the secureConnectionStart attribute as follows: ◎ When a secure transport is used, the user agent MUST record the time as secureConnectionStart immediately before the handshake process to secure the connection. ◎ When a secure transport is not used, the user agent MUST set the value of secureConnectionStart to 0.
-
`要請~開始@i:
- `requestStart$m ~SET ~UAが文書への要請の送信を開始する直前の時刻 ◎ [request-start-step] Immediately before a user agent starts sending request for the document, record the current time as requestStart.
- `応答~開始@i ⇒ `responseStart$m ~SET ~UAが応答の最初の~byteを受信した直後の時刻 ◎ Record the time as responseStart immediately after the user agent receives the first byte of the response.
- `応答~終了@i ⇒ `responseEnd$m ~SET ~UAが応答の最後の~byteを受信した直後の時刻 ◎ Record the time as responseEnd immediately after receiving the last byte of the response.
この段の中で 要請の送信または応答~全体の受信-に失敗し,接続を再び開く必要がある場合 ⇒ ~GOTO `接続-開始$i ◎ Return to connect-start-step if the user agent fails to send the request or receive the entire response, and needs to reopen the connection.
注記: `持続的~接続$が可能化されているときは、 ~UAはまず最初に,要請を送信するために開いた接続の再利用を(その接続は`非同期に閉じられ$得るが)試行して~MAY。 そのような場合の `connectStart$m, `connectEnd$m, `requestStart$m は、再び開いた接続において収集された計時~情報を表現する~SHOULDである。 ◎ When persistent connection [RFC7230] is enabled, a user agent MAY first try to re-use an open connect to send the request while the connection can be asynchronously closed. In such case, connectStart, connectEnd and requestStart SHOULD represent timing information collected over the re-open connection.
- ( `transferSize$m, `encodedBodySize$m, `decodedBodySize$m ) ~SET 前~段による結果の対応する値 ◎ Set the value of transferSize, encodedBodySize, decodedBodySize to corresponding values.
-
~IF[ 資源を~fetchした結果,`~redirect等$になった ]: ◎ If the fetched resource results in an HTTP redirect or equivalent, then
- ~IF[ ~fetchされた資源は`計時許可~検査$に合格しなかった ] ⇒# ( `redirectStart$m, `redirectEnd$m, `unloadEventStart$m, `unloadEventEnd$m, `redirectCount$m ) ~SET ( 0, 0, 0, 0, 0 ); ~GOTO `~fetch開始$i(新たな資源の下で) ◎ If the timing allow check algorithm does not pass for the origin of the fetched resource, set redirectStart, redirectEnd, unloadEventStart, unloadEventEnd and redirectCount to 0. Then, return to fetch-start-step with the new resource.
- `redirectCount$m ~INCBY 1 ◎ Increment redirectCount by 1.
- ~IF[ `redirectStart$m ~EQ 0 ] ⇒ `redirectStart$m ~SET `fetchStart$m ◎ If the value of redirectStart is 0, let it be the value of fetchStart.
- `redirectEnd$m ~SET `responseEnd$m ◎ Let redirectEnd be the value of responseEnd.
- `nextHopProtocol$m ~SET 空 `DOMString^I ◎ ↓
- %T 内の属性のうち,次に挙げるものを除く すべての属性の値 ~SET 0 ⇒ `startTime$m, `redirectStart$m, `redirectEnd$m, `redirectCount$m, `type$m, `nextHopProtocol$m, `unloadEventStart$m, `unloadEventEnd$m ◎ Set all of the attributes in the PerformanceNavigationTiming object to 0 except startTime, redirectStart, redirectEnd, redirectCount, type, nextHopProtocol, unloadEventStart and unloadEventEnd. Set nextHopProtocol to the empty DOMString.
- ~GOTO `~fetch開始$i(新たな資源の下で) ◎ Return to fetch-start-step with the new resource.
- `domInteractive$m ~SET ~UAが文書の`現在の準備度$を `interactive^l に設定する直前の時刻 ◎ Record the time as domInteractive immediately before the user agent sets the current document readiness to "interactive".
- `domContentLoadedEventStart$m ~SET ~UAが文書に向けて `DOMContentLoaded$et ~eventを発火する直前の時刻 ◎ Record the time as domContentLoadedEventStart immediately before the user agent fires the DOMContentLoaded event at the document.
- `domContentLoadedEventEnd$m ~SET `DOMContentLoaded$et ~eventが完了した直後の時刻 ◎ Record the time as domContentLoadedEventEnd immediately after the DOMContentLoaded event completes.
- `domComplete$m ~SET ~UAが文書の`現在の準備度$を `complete^l に設定する直前の時刻 ◎ Record the time as domComplete immediately before the user agent sets the current document readiness to "complete".
- `loadEventStart$m ~SET ~UAが `load^et ~eventを発火する直前の時刻 ◎ Record the time as loadEventStart immediately before the user agent fires the load event.
- `loadEventEnd$m ~SET ~UAが `load^et ~eventを完了した直後の時刻 ◎ Record the time as loadEventEnd immediately after the user agent completes the load event.
- `duration$m ~SET [ `startTime$m から `loadEventEnd$m まで ]の`所要時間$ ◎ Set the duration to a DOMHighResTimeStamp equal to the difference between loadEventEnd and startTime, respectively.
- `処理能~entryを~queueする$( %T ) ◎ Queue the new PerformanceNavigationTiming object.
一部の~UAは、 “進む”, “戻る” などの~navi演算の間,文書の DOM 構造を~memory内に保守する。 そのような~naviの間に `PerformanceNavigationTiming$I ~objが改められては~MUST_NOT。 ◎ Some user agents maintain the DOM structure of the document in memory during navigation operations such as forward and backward. In those cases, the PerformanceNavigationTiming object MUST NOT be altered during the navigation.
5. ~privacy
~INFORMATIVE5.1. 情報の流出
注意深く細工された計時~攻撃の利用により、末端利用者による 閲覧/行動 の履歴が流出する可能性がある。 具体例として、~unload時刻から前の~pageの~unload~handlerに要した時間が明らかにされ,利用者の~login-statusの推定-に利用され得る。 これらの攻撃は、前の~naviを含む計時~情報が~accessされる際に,`計時許可~検査$を施行することにより軽減される。 `RESOURCE-TIMING-2$r ◎ There is the potential for disclosing an end-user's browsing and activity history by using carefully crafted timing attacks. For instance, the unloading time reveals how long the previous page takes to execute its unload handler, which could be used to infer the user's login status. These attacks have been mitigated by enforcing the timing allow check algorithm when timing information involving the previous navigation is accessed. [RESOURCE-TIMING-2]
`緩い同一生成元~policy$は、文書~間に渡る,未承認の訪問に対する十分な保護を供さない。 共有~hostにおいては、信頼できない第三者が,同じ IP ~addressの異なる~port上で~HTTP~serverを~hostし得る。 ◎ The relaxed same origin policy doesn't provide sufficient protection against unauthorized visits across documents. In shared hosting, an untrusted third party is able to host an HTTP server at the same IP address but on a different port.
5.2. ~directory間をまたがる~access
同じ~host名を共有する異なる~page — 例えば、同じ~siteに~hostされている,利用者が生成した内容を伴う, 異なる作者による内容 — は、~path名に基いて~accessを制約するような特色機能がないため,`同一生成元$から来たものと見なされる。 これらの~page間の~naviに際しては、後の~pageから,~redirectや`~unload~event$に対する計時など,前の~pageの計時~情報への~accessが可能になる。 ◎ Different pages sharing one host name, for example contents from different authors hosted on sites with user generated content are considered from the same origin because there is no feature to restrict the access by pathname. Navigating between these pages allows a latter page to access timing information of the previous one, such as timing regarding redirection and unload event.
6. 保安
~INFORMATIVE`PerformanceNavigationTiming$I ~interfaceは、`現在の文書$により~loadされる どの資源 — ~web~pageや~workerなど — に対しても,文書の計時~情報を公開する。 `PerformanceNavigationTiming$I ~interfaceへの~accessを制限するため、`計時許可~検査$が施行される — `RESOURCE-TIMING$r の 非同一生成元の資源 節 に述べられるように、一部の属性は,既定で 0 に設定される。 資源を供する~serverは、 `Timing-Allow-Origin$h ~HTTP応答~headerを追加することにより,`現在の文書$に対する計時~情報すべてが収集されることを明示的に許容できる — それは、計時~情報への~accessが許容される~domainを指定する。 ◎ The PerformanceNavigationTiming interface exposes timing information for the current document to any resource loaded by the document, such as a web page or a worker. To limit the access to the PerformanceNavigationTiming interface, the timing allow check algorithm is enforced and certain attributes are set to zero, as described in 4.5 Cross-origin Resources [RESOURCE-TIMING]. Resource providers can explicitly allow all timing information to be collected for a current document by adding the Timing-Allow-Origin HTTP response header, which specifies the domains that are allowed to access the timing information.
6.1. ~proxy~serverの検出-法
~UAと~web~serverとの間に~proxyが配備されている場合、 `connectStart$m 属性と `connectEnd$m 属性との間の時区間は、 ~web~serverではなく,~proxyと~UAとの間の遅延を示すものになる。 それにより、~web~serverは,~proxyの存在を推定できる可能性がある。 SOCKS ~proxyについては、この時区間には~proxy認証に要した時間と~proxyが~web~serverへの接続に要した時間も含まれ,~proxyの検出を難しくする。 ~HTTP~proxyの場合、~UAは~proxy~serverについての知識を一切持たないこともあるので、この攻撃を常に軽減できるとは限らない。 ◎ In case a proxy is deployed between the user agent and the web server, the time interval between the connectStart and the connectEnd attributes indicates the delay between the user agent and the proxy instead of the web server. With that, web server can potentially infer the existence of the proxy. For SOCKS proxy, this time interval includes the proxy authentication time and time the proxy takes to connect to the web server, which obfuscate the proxy detection. In case of an HTTP proxy, the user agent might not have any knowledge about the proxy server at all so it's not always feasible to mitigate this attack.
7. 廃用
この節では、以前に `NAVIGATION-TIMING$r Level 1 にて導入された属性, ~interfaceを定義し,後方互換性のために ここに保つ。 作者には、以下の~interfaceを利用するべきでない — 新たな `PerformanceNavigationTiming$I ~interfaceを利用することを強く勧める。 変更点と改善点の要約を見よ。 ◎ This section defines attributes and interfaces previously introduced in [NAVIGATION-TIMING] Level 1 and are kept here for backwards compatibility. Authors should not use the following interfaces and are strongly advised to use the new PerformanceNavigationTiming interface—see summary of changes and improvements.
以下における `局所~cache等@ は、[ `関連する~app~cache$, または局所~資源 ]を指す総称とする。
7.1. `PerformanceTiming^I ~interface
[`Exposed$=Window] interface `PerformanceTiming$I { readonly attribute unsigned long long `navigationStart$1; readonly attribute unsigned long long `unloadEventStart$1; readonly attribute unsigned long long `unloadEventEnd$1; readonly attribute unsigned long long `redirectStart$1; readonly attribute unsigned long long `redirectEnd$1; readonly attribute unsigned long long `fetchStart$1; readonly attribute unsigned long long `domainLookupStart$1; readonly attribute unsigned long long `domainLookupEnd$1; readonly attribute unsigned long long `connectStart$1; readonly attribute unsigned long long `connectEnd$1; readonly attribute unsigned long long `secureConnectionStart$1; readonly attribute unsigned long long `requestStart$1; readonly attribute unsigned long long `responseStart$1; readonly attribute unsigned long long `responseEnd$1; readonly attribute unsigned long long `domLoading$1; readonly attribute unsigned long long `domInteractive$1; readonly attribute unsigned long long `domContentLoadedEventStart$1; readonly attribute unsigned long long `domContentLoadedEventEnd$1; readonly attribute unsigned long long `domComplete$1; readonly attribute unsigned long long `loadEventStart$1; readonly attribute unsigned long long `loadEventEnd$1; [`Default$] object `toJSON$1(); };
注記: この節に定義されるすべての時刻~値は、 1970 年 1 月 1 日, 午前 0 時( UTC )からのミリ秒単位で計測されるとする。 ◎ All time values defined in this section are measured in milliseconds since midnight of January 1, 1970 (UTC).
- `navigationStart@1
- 前の文書があるならば ~UAが前の文書に対し`~unloadを~prompt$し終えた直後の時刻 / ~ELSE_ 現在の文書が作成された時刻を返さ~MUST。 ◎ This attribute must return the time immediately after the user agent finishes prompting to unload the previous document. If there is no previous document, this attribute must return the time the current document is created.
- 注記: この属性は、 `PerformanceNavigationTiming$I 用には定義されていない。 作者は、代わりに `timeOrigin$m を利用して,等価な時刻印を得られる。 ◎ This attribute is not defined for PerformanceNavigationTiming. Instead, authors can use timeOrigin to obtain equivalent timestamp.
- `unloadEventStart@1
- 前の文書がある, かつ 前の文書と現在の文書が`同一生成元$に属する場合は,~UAが前の文書の`~unload~event$を開始する直前の時刻 / ~ELSE_ 0 を返さ~MUST。 ◎ If the previous document and the current document have the same origin [RFC6454], this attribute must return the time immediately before the user agent starts the unload event of the previous document. If there is no previous document or the previous document has a different origin than the current document, this attribute must return zero.
- `unloadEventEnd@1
- 前の文書はある, かつ 前の文書と現在の文書が`同一生成元$に属する, かつ 前の文書の`~unload~event$は完了している 場合は,~UAが その~eventを終えた直後の時刻 / ~ELSE_ 0 を返さ~MUST。 ◎ If the previous document and the current document have the same same origin, this attribute must return the time immediately after the user agent finishes the unload event of the previous document. If there is no previous document or the previous document has a different origin than the current document or the unload is not yet completed, this attribute must return zero.
- ~navigate時に`~redirect等$があって, かつ その中に`同一生成元$に属さない`~redirect等$がある場合、 `unloadEventStart$1 と `unloadEventEnd$1 は,いずれも 0 を返さ~MUST。 ◎ If there are HTTP redirects or equivalent when navigating and not all the redirects or equivalent are from the same origin, both unloadEventStart and unloadEventEnd must return the zero.
- `redirectStart@1
- ~navigate時に`~redirect等$があって, かつ すべての`~redirect等$が`同一生成元$に属する場合は, `fetchStart$1 と同じ値 / ~ELSE_ 0 を返さ~MUST。 ◎ If there are HTTP redirects or equivalent when navigating and if all the redirects or equivalent are from the same origin, this attribute must return the starting time of the fetch that initiates the redirect. Otherwise, this attribute must return zero.
- `redirectEnd@1
- ~navigate時に`~redirect等$があって, かつ すべての`~redirect等$が`同一生成元$に属する場合は,その最後の~redirectの応答の最後の~byteを受信した直後の時刻 / ~ELSE_ 0 を返さ~MUST。 ◎ If there are HTTP redirects or equivalent when navigating and all redirects and equivalents are from the same origin, this attribute must return the time immediately after receiving the last byte of the response of the last redirect. Otherwise, this attribute must return zero.
- `fetchStart@1
- `GET 等$を用いて新たな資源が`~fetch$された場合は,~UAが`関連する~app~cache$の検査を開始する直前の時刻 / ~ELSE_ ~UAが資源の`~fetch$を開始した時刻 を返さ~MUST。 ◎ If the new resource is to be fetched using HTTP GET or equivalent, fetchStart must return the time immediately before the user agent starts checking any relevant application caches. Otherwise, it must return the time when the user agent starts fetching the resource.
- `domainLookupStart@1
- 現在の文書の~domain名~検索を開始する直前の時刻を返さ~MUST。 `持続的~接続$が利用されている,または 現在の文書が`局所~cache等$から検索取得されている場合、この属性は `fetchStart$1 と同じ値を返さ~MUST。 ◎ This attribute must return the time immediately before the user agent starts the domain name lookup for the current document. If a persistent connection [RFC2616] is used or the current document is retrieved from relevant application caches or local resources, this attribute must return the same value as fetchStart.
- `domainLookupEnd@1
- ~UAが現在の文書に対する~domain名~検索を終えた直後の時刻を返さ~MUST。 `持続的~接続$が利用されている,または 現在の文書が`局所~cache等$から検索取得されている場合、この属性は `fetchStart$1 と同じ値を返さ~MUST。 ◎ This attribute must return the time immediately after the user agent finishes the domain name lookup for the current document. If a persistent connection [RFC2616] is used or the current document is retrieved from relevant application caches or local resources, this attribute must return the same value as fetchStart.
- 注記: `~HTTP~cache$からの内容の 検査と検索取得は`~fetching$の一部である。 それは、[ `requestStart$1, `responseStart$1, `responseEnd$1 ]属性が受持つ。 ◎ Checking and retrieving contents from the HTTP cache [RFC2616] is part of the fetching process. It's covered by the requestStart, responseStart and responseEnd attributes.
- 注記: ~UAが~cache内に~domain情報をすでに持っている場合、[ `domainLookupStart$1, `domainLookupEnd$1 ]は,順に,~UAによる~cacheからの~domain~dataの検索取得の[ 開始-, 終了- ]した時刻を表現する。 ◎ In case where the user agent already has the domain information in cache, domainLookupStart and domainLookupEnd represent the times when the user agent starts and ends the domain data retrieval from the cache.
- `connectStart@1
- ~UAが文書を検索取得するために~serverへの接続を確立し始める直前の時刻を返さ~MUST。 `持続的~接続$が利用されている,または 現在の文書が`局所~cache等$から検索取得されている場合、この属性は `domainLookupEnd$1 と同じ値を返さ~MUST。 ◎ This attribute must return the time immediately before the user agent start establishing the connection to the server to retrieve the document. If a persistent connection [RFC2616] is used or the current document is retrieved from relevant application caches or local resources, this attribute must return value of domainLookupEnd.
- `connectEnd@1
- ~UAが文書を検索取得するための~serverへの接続を確立し終えた直後の時刻を返さ~MUST。 `持続的~接続$が利用されている,または 現在の文書が`局所~cache等$から検索取得されている場合、この属性は `domainLookupEnd$1 と同じ値を返さ~MUST。 ◎ This attribute must return the time immediately after the user agent finishes establishing the connection to the server to retrieve the current document. If a persistent connection [RFC2616] is used or the current document is retrieved from relevant application caches or local resources, this attribute must return the value of domainLookupEnd
- ~transport接続が失敗し, かつ~UAが接続を再び開いた場合、[ `connectStart$1, `connectEnd$1 ]は,新たな接続に対応する値を返すべきである。 ◎ If the transport connection fails and the user agent reopens a connection, connectStart and connectEnd should return the corresponding values of the new connection.
- `connectEnd$1 には、 SSL ~handshakeや SOCKS 認証も含めて,~transport接続を確立するのに要した時間も含まれ~MUST。 ◎ connectEnd must include the time interval to establish the transport connection as well as other time interval such as SSL handshake and SOCKS authentication.
- `secureConnectionStart@1
- この属性の~supportは~UAの任意選択である。 ~UAは、この属性を可用にしない場合は, `undefined^c を返さ~MUST。 可用にする場合、[ 現在の~pageの`~URL~scheme$ `URL$r は`~HTTPS$ならば、現在の接続を保安的にするための~handshake処理-を開始する直前の時刻 / ~ELSE_ 0 ]を返さ~MUST. ◎ This attribute is optional. User agents that don't have this attribute available must set it as undefined. When this attribute is available, if the scheme [URL] of the current page is HTTPS, this attribute must return the time immediately before the user agent starts the handshake process to secure the current connection. If this attribute is available but HTTPS is not used, this attribute must return zero.
- `requestStart@1
- ~UAが,現在の文書を[ ~serverから, または`局所~cache等$から ]得るために 要請を開始した直前の時刻を返さ~MUST。 ◎ This attribute must return the time immediately before the user agent starts requesting the current document from the server, or from relevant application caches or from local resources.
- 要請を送信した後に~transport接続が失敗して, ~UAが接続を再び開いて要請を再送信していた場合、 `requestStart$1 は,新たな要請に対応している値を返すべきである。 ◎ If the transport connection fails after a request is sent and the user agent reopens a connection and resend the request, requestStart should return the corresponding values of the new request.
-
注記: この~interfaceには
requestEnd
のような類いの,要請の送信の完了を表現する属性は含まれていない: ◎ This interface does not include an attribute to represent the completion of sending the request, e.g., requestEnd.- ~UAからの要請の送信の完了は、(その種の属性の便益のほとんどを占める)~network~transportにおける対応する完了時刻を常に指示するとは限らない。 ◎ Completion of sending the request from the user agent does not always indicate the corresponding completion time in the network transport, which brings most of the benefit of having such an attribute.
- 一部の~UAにおいては、HTTP 層の~encapsulationに因り,要請の送信を実際に完了した時刻を決定するのに~costがかかる。 ◎ Some user agents have high cost to determine the actual completion time of sending the request due to the HTTP layer encapsulation.
- `responseStart@1
- ~UAが~serverからの, または`局所~cache等$からの,応答の最初の~byteを受信した直後の時刻を返さ~MUST。 ◎ This attribute must return the time immediately after the user agent receives the first byte of the response from the server, or from relevant application caches or from local resources.
- `responseEnd@1
- ~UAが 現在の文書の最後の~byteを受信した直後の時刻と, ~transport接続が閉じらる直前の時刻のうち,早い方を返さ~MUST。 ここでの文書は、~serverから, および`局所~cache等$から,のいずれから受信されたものも含まれる。 ◎ This attribute must return the time immediately after the user agent receives the last byte of the current document or immediately before the transport connection is closed, whichever comes first. The document here can be received either from the server, relevant application caches or from local resources.
- `domLoading@1
- ~UAが文書の`現在の準備度$を `loading^l に設定する直前の時刻を返さ~MUST。 ◎ This attribute must return the time immediately before the user agent sets the current document readiness to "loading".
- 既存の~UA内で `Document$I ~objが いつ作成されたかの違いに因り,この属性が返す値は実装に特有であり、意味のある計量に利用されるべきではない。 ◎ Due to differences in when a Document object is created in existing user agents, the value returned by the domLoading is implementation specific and should not be used in meaningful metrics.
- `domInteractive@1
- ~UAが文書の`現在の準備度$を `interactive^l に設定する直前の時刻を返さ~MUST。 ◎ This attribute must return the time immediately before the user agent sets the current document readiness to "interactive".
- `domContentLoadedEventStart@1
- ~UAが `Document$I に向けて `DOMContentLoaded$et ~eventを発火する直前の時刻を返さ~MUST。 ◎ This attribute must return the time immediately before the user agent fires the DOMContentLoaded event at the Document.
- `domContentLoadedEventEnd@1
-
文書の
DOMContentLoaded
~event が完了した直後の時刻を返さ~MUST。 ◎ This attribute must return the time immediately after the document's DOMContentLoaded event completes. - `domComplete@1
- ~UAが文書の`現在の準備度$を `complete^l に設定する直前の時刻を返さ~MUST。 ◎ This attribute must return the time immediately before the user agent sets the current document readiness to "complete".
- 文書の`現在の準備度$が複数回にわたり同じ状態に変化した場合、 `domLoading$1, `domInteractive$1, `domContentLoadedEventStart$1, `domContentLoadedEventEnd$1, `domComplete$1 は、最初に生じた 文書の`現在の準備度$の変化に対応している時刻を返さ~MUST。 ◎ If the current document readiness changes to the same state multiple times, domLoading, domInteractive, domContentLoadedEventStart, domContentLoadedEventEnd and domComplete must return the time of the first occurrence of the corresponding document readiness change.
- `loadEventStart@1
- 現在の文書に `load^et ~eventが発火される直前の時刻を返さ~MUST。 `load^et ~eventがまだ発火されていないときには、 0 を返さ~MUST。 ◎ This attribute must return the time immediately before the load event of the current document is fired. It must return zero when the load event is not fired yet.
- `loadEventEnd@1
- 現在の文書の `load^et ~eventの発火-が完了した時刻を返さ~MUST。 `load^et ~eventがまだ発火されていない, またはまだ完了していないときには、 0 を返さ~MUST。 ◎ This attribute must return the time when the load event of the current document is completed. It must return zero when the load event is not fired or is not completed.
- `toJSON@1
- `WEBIDL$r による`既定の~toJSON演算$を走らす。 ◎ Runs [WEBIDL]'s default toJSON operation.
7.3. `Performance^I ~interfaceに対する拡張
[`Exposed$=Window] partial interface `Performance^I { [`SameObject$] readonly attribute `PerformanceTiming$I `timing$1; [`SameObject$] readonly attribute `PerformanceNavigation$I `navigation$1; };
`Performance^I ~interfaceは `PERFORMANCE-TIMELINE-2$r にて定義される。 ◎ The Performance interface is defined in [PERFORMANCE-TIMELINE-2].
- `timing@1
- 最後の非~redirect ~navi以降の`閲覧~文脈$に関係する計時~情報を表現する。 ◎ The timing attribute represents the timing information related to the browsing contexts since the last non-redirect navigation.
- この属性は `PerformanceTiming$I ~interfaceにより定義される。 ◎ This attribute is defined by the PerformanceTiming interface.
- `navigation@1
- この属性は `PerformanceNavigation$I ~interfaceにより定義される。 ◎ The navigation attribute is defined by the PerformanceNavigation interface.