1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
---
title: PerformanceTiming
slug: Web/API/PerformanceTiming
translation_of: Web/API/PerformanceTiming
---
<div>{{APIRef("Navigation Timing")}}</div>
<div class="warning">
<p>このインターフェイスは <a href="https://w3c.github.io/navigation-timing/#obsolete">Navigation Timing Level 2 仕様</a>では非推奨です。代わりに {{domxref("PerformanceNavigationTiming")}} インターフェイスを使用してください。</p>
</div>
<p><strong><code>PerformanceTiming</code></strong> インターフェイスは、下位互換性のために維持されている従来のインターフェイスであり、現在のページのロード中および使用中に発生するさまざまなイベントに関するパフォーマンスタイミング情報を提供するプロパティを含みます。{{domxref("Performance.timing", "window.performance.timing")}} プロパティを使用して、ページを記述する <code>PerformanceTiming</code> オブジェクトを取得します。</p>
<h2 id="プロパティ">プロパティ</h2>
<p><em>The <code>PerformanceTiming</code> interface doesn't inherit any properties.</em></p>
<p>These properties each describe the time at which a particular point in the page loading process was reached. Some correspond to DOM events; others describe the time at which internal browser operations of interest took place.</p>
<p>Each time is provided as an <code>unsigned long long</code> representing the moment, in milliseconds since the UNIX epoch</p>
<p>These properties are listed in the order in which they occur during the navigation process.</p>
<dl>
<dt>{{deprecated_inline}} {{domxref("PerformanceTiming.navigationStart")}} {{readonlyInline}}</dt>
<dd>When the prompt for unload terminates on the previous document in the same browsing context. If there is no previous document, this value will be the same as <code>PerformanceTiming.fetchStart</code>.</dd>
<dt>{{deprecated_inline}} {{domxref("PerformanceTiming.unloadEventStart")}} {{readonlyInline}}</dt>
<dd>When the {{event("unload")}} event has been thrown, indicating the time at which the previous document in the window began to unload. If there is no previous document, or if the previous document or one of the needed redirects is not of the same origin, the value returned is <code>0</code>.</dd>
<dt>{{deprecated_inline}} {{domxref("PerformanceTiming.unloadEventEnd")}} {{readonlyInline}}</dt>
<dd>When the {{event("unload")}} event handler finishes. If there is no previous document, or if the previous document, or one of the needed redirects, is not of the same origin, the value returned is <code>0</code>.</dd>
<dt>{{deprecated_inline}} {{domxref("PerformanceTiming.redirectStart")}} {{readonlyInline}}</dt>
<dd>When the first HTTP redirect starts. If there is no redirect, or if one of the redirects is not of the same origin, the value returned is <code>0</code>.</dd>
<dt>{{deprecated_inline}} {{domxref("PerformanceTiming.redirectEnd")}} {{readonlyInline}}</dt>
<dd>When the last HTTP redirect is completed, that is when the last byte of the HTTP response has been received. If there is no redirect, or if one of the redirects is not of the same origin, the value returned is <code>0</code>.</dd>
<dt>{{deprecated_inline}} {{domxref("PerformanceTiming.fetchStart")}} {{readonlyInline}}</dt>
<dd>When the browser is ready to fetch the document using an HTTP request. This moment is <em>before</em> the check to any application cache.</dd>
<dt>{{deprecated_inline}} {{domxref("PerformanceTiming.domainLookupStart")}} {{readonlyInline}}</dt>
<dd>When the domain lookup starts. If a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as <code>PerformanceTiming.fetchStart</code>.</dd>
<dt>{{deprecated_inline}} {{domxref("PerformanceTiming.domainLookupEnd")}} {{readonlyInline}}</dt>
<dd>When the domain lookup is finished. If a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as <code>PerformanceTiming.fetchStart</code>.</dd>
<dt>{{deprecated_inline}} {{domxref("PerformanceTiming.connectStart")}} {{readonlyInline}}</dt>
<dd>When the request to open a connection is sent to the network. If the transport layer reports an error and the connection establishment is started again, the last connection establishment start time is given. If a persistent connection is used, the value will be the same as <code>PerformanceTiming.fetchStart</code>.</dd>
<dt>{{deprecated_inline}} {{domxref("PerformanceTiming.connectEnd")}} {{readonlyInline}}</dt>
<dd>When the connection is opened network. If the transport layer reports an error and the connection establishment is started again, the last connection establishment end time is given. If a persistent connection is used, the value will be the same as <code>PerformanceTiming.fetchStart</code>. A connection is considered as opened when all secure connection handshake, or SOCKS authentication, is terminated.</dd>
<dt>{{deprecated_inline}} {{domxref("PerformanceTiming.secureConnectionStart")}} {{readonlyInline}}</dt>
<dd>When the secure connection handshake starts. If no such connection is requested, it returns <code>0</code>.</dd>
<dt>{{deprecated_inline}} {{domxref("PerformanceTiming.requestStart")}} {{readonlyInline}}</dt>
<dd>When the browser sent the request to obtain the actual document, from the server or from a cache. If the transport layer fails after the start of the request and the connection is reopened, this property will be set to the time corresponding to the new request.</dd>
<dt>{{deprecated_inline}} {{domxref("PerformanceTiming.responseStart")}} {{readonlyInline}}</dt>
<dd>When the browser received the first byte of the response, from the server from a cache, or from a local resource.</dd>
<dt>{{deprecated_inline}} {{domxref("PerformanceTiming.responseEnd")}} {{readonlyInline}}</dt>
<dd>When the browser received the last byte of the response, or when the connection is closed if this happened first, from the server, the cache, or from a local resource.</dd>
<dt>{{deprecated_inline}} {{domxref("PerformanceTiming.domLoading")}} {{readonlyInline}}</dt>
<dd>When the parser started its work, that is when its {{domxref("Document.readyState")}} changes to <code>'loading'</code> and the corresponding {{event("readystatechange")}} event is thrown.</dd>
<dt>{{deprecated_inline}} {{domxref("PerformanceTiming.domInteractive")}} {{readonlyInline}}</dt>
<dd>When the parser finished its work on the main document, that is when its {{domxref("Document.readyState")}} changes to <code>'interactive'</code> and the corresponding {{event("readystatechange")}} event is thrown.</dd>
<dt>{{deprecated_inline}} {{domxref("PerformanceTiming.domContentLoadedEventStart")}} {{readonlyInline}}</dt>
<dd>Right before the parser sent the {{event("DOMContentLoaded")}} event, that is right after all the scripts that need to be executed right after parsing have been executed.</dd>
<dt>{{deprecated_inline}} {{domxref("PerformanceTiming.domContentLoadedEventEnd")}} {{readonlyInline}}</dt>
<dd>Right after all the scripts that need to be executed as soon as possible, in order or not, have been executed.</dd>
<dt>{{deprecated_inline}} {{domxref("PerformanceTiming.domComplete")}} {{readonlyInline}}</dt>
<dd>When the parser finished its work on the main document, that is when its {{domxref("Document.readyState")}} changes to <code>'complete'</code> and the corresponding {{event("readystatechange")}} event is thrown.</dd>
<dt>{{deprecated_inline}} {{domxref("PerformanceTiming.loadEventStart")}} {{readonlyInline}}</dt>
<dd>When the {{event("load")}} event was sent for the current document. If this event has not yet been sent, it returns <code>0.</code></dd>
<dt>{{deprecated_inline}} {{domxref("PerformanceTiming.loadEventEnd")}} {{readonlyInline}}</dt>
<dd>When the {{event("load")}} event handler terminated, that is when the load event is completed. If this event has not yet been sent, or is not yet completed, it returns <code>0.</code></dd>
</dl>
<h2 id="メソッド">メソッド</h2>
<p><em>The <code>PerformanceTiming</code></em> <em>interface doesn't inherit any methods.</em></p>
<dl>
<dt>{{deprecated_inline}} {{domxref("PerformanceTiming.toJSON()")}} {{non-Standard_Inline}}</dt>
<dd>Returns a <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON" title="/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON">JSON object</a> representing this <code>PerformanceTiming</code> object.</dd>
</dl>
<h2 id="仕様">仕様</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">仕様書</th>
<th scope="col">ステータス</th>
<th scope="col">コメント</th>
</tr>
<tr>
<td>{{SpecName('Navigation Timing', '#sec-navigation-timing-interface', 'PerformanceTiming')}}</td>
<td>{{Spec2('Navigation Timing')}}</td>
<td>初期定義</td>
</tr>
</tbody>
</table>
<h2 id="ブラウザの互換性">ブラウザの互換性</h2>
<div>
<p>{{Compat("api.PerformanceTiming")}}</p>
</div>
<h2 id="あわせて参照">あわせて参照</h2>
<ul>
<li>The {{domxref("Performance.timing")}} property that creates such an object.</li>
</ul>
|