Movatterモバイル変換


[0]ホーム

URL:


This specification defines an interface for web applications to access the complete timing information for navigation of a document.

Navigation Timing 2 replaces the first version of [[NAVIGATION-TIMING]] and includes the following changes:

Introduction

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()">        <!- Main page body goes from here. -->        </body>        </html>

The above script calculates the time it takes to load the pageafter 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.

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]], all time values are measured with respect to the [=environment settings object/time origin=] of the entry's [=relevant settings object=].

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  // start time of the navigation request      responseEnd:       100.000  // high resolution time of last received byte

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() {          // Get the first entry          const [entry] = performance.getEntriesByType("navigation");          // Show it in a nice table in the developer console          console.table(entry.toJSON());        }        </script>        <body onload="showNavigationDetails()">

Terminology

The construction "aFoo object", whereFoo is actually an interface, is sometimes used instead of the more accurate "an object implementing the interfaceFoo.

The termcurrent document refers to the document associated with theWindow object's newest Document object.

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 termcurrent 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]] specification.

Navigation Timing

Relation to the {{PerformanceEntry}} interface

{{PerformanceNavigationTiming}} interface extends the following attributes of {{PerformanceEntry}} interface:

A user agent implementing {{PerformanceNavigationTiming}} would need to include"navigation" insupportedEntryTypes forWindow contexts. This allows developers to detect support for Navigation Timing.

Relation to thePerformanceResourceTiming interface

{{PerformanceNavigationTiming}} interface extends the following attributes of thePerformanceResourceTiming interface:

Only thecurrent document resource is included in the performance timeline; there is only one {{PerformanceNavigationTiming}} object in the performance timeline.

ThePerformanceNavigationTiming interface

Checking and retrieving contents from theHTTP cache [[RFC7234]] is part of thefetching process. It's covered by the requestStart, responseStart and responseEnd attributes.

        [Exposed=Window]        interface PerformanceNavigationTiming : PerformanceResourceTiming {            readonly        attribute DOMHighResTimeStamp  unloadEventStart;            readonly        attribute DOMHighResTimeStamp  unloadEventEnd;            readonly        attribute DOMHighResTimeStamp  domInteractive;            readonly        attribute DOMHighResTimeStamp  domContentLoadedEventStart;            readonly        attribute DOMHighResTimeStamp  domContentLoadedEventEnd;            readonly        attribute DOMHighResTimeStamp  domComplete;            readonly        attribute DOMHighResTimeStamp  loadEventStart;            readonly        attribute DOMHighResTimeStamp  loadEventEnd;            readonly        attribute NavigationTimingType type;            readonly        attribute unsigned short       redirectCount;            readonly        attribute DOMHighResTimeStamp  criticalCHRestart;            readonly        attribute NotRestoredReasons?  notRestoredReasons;            readonly        attribute PerformanceTimingConfidence confidence;            [Default] object toJSON();        };

APerformanceNavigationTiming has an associated [=document load timing info=]document load timing.

APerformanceNavigationTiming has an associated [=document unload timing info=]previous document unload timing.

APerformanceNavigationTiming has an associated numberredirect count.

APerformanceNavigationTiming has an associated {{NavigationTimingType}}navigation type.

APerformanceNavigationTiming has an associated {{DOMHighResTimeStamp}}`Critical-CH` restart time.

APerformanceNavigationTiming has an associated {{NotRestoredReasons}}not restored reasons.

APerformanceNavigationTiming has an associated {{PerformanceTimingConfidence}}confidence value.

APerformanceNavigationTiming has an associated real numberrandomized trigger rate which is [=implementation-defined=].

APerformanceNavigationTiming has an associated {{PerformanceTimingConfidenceValue}}underlying confidence value which is [=implementation-defined=].

A {{PerformanceNavigationTiming}} has an associated null or [=service worker timing info=]service worker timing.

TheunloadEventStart getter steps are to return |this|'s [=previous document unload timing=]'s [=document unload timing info/unload event start time=].

If the previous document and the current document have the sameorigin, this timestamp is measured immediately before the user agent starts theunload event of the previous document. If there is no previous document or the previous document has a differentorigin than the current document, this attribute will return zero.

TheunloadEventEnd getter steps are to return |this|'s [=previous document unload timing=]'s [=document unload timing info/unload event end time=].

If the previous document and the current document have the sameorigin, this timestamp is measured immediately after the user agent handles theunload event of the previous document. If there is no previous document or the previous document has a differentorigin than the current document, this attribute will return zero.

ThedomInteractive getter steps are to return |this|'s [=document load timing=]'s [=document load timing info/DOM interactive time=].

This timestamp is measured before the user agent sets thecurrent document readiness to"interactive".

ThedomContentLoadedEventStart getter steps are to return |this|'s [=document load timing=]'s [=document load timing info/DOM content loaded event start time=].

This timestamp is measured before the user agent dispatches theDOMContentLoaded event.

ThedomContentLoadedEventEnd getter steps are to return |this|'s [=document load timing=]'s [=document load timing info/DOM content loaded event end time=].

This timestamp is measured after the user agent completes handling of theDOMContentLoaded event.

ThedomComplete getter steps are to return |this|'s [=document load timing=]'s [=document load timing info/DOM complete time=].

This timestamp is measured before the user agent sets thecurrent document readiness to"complete". Seedocument readiness for a precise definition.

TheloadEventStart getter steps are to return |this|'s [=document load timing=]'s [=document load timing info/load event start time=].

This timestamp is measured before the user agent dispatches the [=Window/load=] event for the document.

TheloadEventEnd getter steps are to return |this|'s [=document load timing=]'s [=document load timing info/load event end time=].

This timestamp is measured after the user agent completes handling the [=Window/load=] event for the document.

Thetype getter steps are to run the |this|'s [=navigation type=].

Client-side redirects, such as those using theRefresh pragma directive, are not consideredHTTP redirects by this spec. In those cases, thetype attribute SHOULD return appropriate value, such asreload if reloading the current page, ornavigate if navigating to a new URL.

TheredirectCount getter steps are to return |this|'sredirect count.

ThecriticalCHRestart getter steps are to return |this|'s`Critical-CH` restart time.

If |criticalCHRestart| is not 0 it will be before all other timestamps except for |navigationStart|, |unloadEventStart|, and |unloadEventEnd|. This is because it marks the moment the redirection part of the navigation was restarted.

ThenotRestoredReasons getter steps are to return |this|'snot restored reasons.

Theconfidence getter steps are to run these steps:

  1. If |this|'s [=document load timing=]'s [=document load timing info/DOM interactive time=] is 0, return null.
  2. If |this|'sconfidence value is not null, return it.
  3. Let |confidence| be a new {{PerformanceTimingConfidence}} object created in [=this=]'s [=relevant settings object=]'s [=relevant realm=].
  4. Set |confidence|'s {{PerformanceTimingConfidence/randomizedTriggerRate}} to |this|'s [=randomized trigger rate=].
  5. Set |confidence|'s {{PerformanceTimingConfidence/value}} as determined by the following algorithm:
    1. Let |p| be |confidence|'s {{PerformanceTimingConfidence/randomizedTriggerRate}}.
    2. Let |underlying| be [=this=]'s [=underlying confidence value=], a {{PerformanceTimingConfidenceValue}}.
    3. Let |r| be a real number drawn uniformly at random from the interval [0, 1).
    4. If |r| > or equal |p|, return |underlying|.
    5. Otherwise:
      1. Let |s| be an integer drawn uniformly at random from the set {0, 1}.
      2. If |s| equals 0, return {{PerformanceTimingConfidenceValue/high}}.
      3. Otherwise, return {{PerformanceTimingConfidenceValue/low}}.
  6. Return |confidence|.

These values should be set once, and not change for the lifetime of [=this=].

This section is intended to help RUM providers and developers interpret |confidence|. Since the [=randomized trigger rate=] can vary across records, per-record weighting is needed to recover unbiased aggregates. The procedure below illustrates how weighting based on {{PerformanceTimingConfidence/value}} can be applied before computing summary statistics.

To compute debiased means for both {{PerformanceTimingConfidenceValue/high}} and {{PerformanceTimingConfidenceValue/low}}:

  1. For each record:
    • Let |p| be the record's {{PerformanceTimingConfidence/randomizedTriggerRate}}.
    • Let |c| be the record's {{PerformanceTimingConfidence/value}}.
    • Let |R| be 1 when |c| is {{PerformanceTimingConfidenceValue/high}}, otherwise 0.
    • Compute per-record weight |w| based on |c|:
      • For estimating the high mean: |w| = (R - (p / 2)) / (1 - p).
      • For estimating the low mean: |w| = ((1 - R) - (p / 2)) / (1 - p).
      Note that |w| may be negative for some records; keep every record.
    • Let |weighted_duration| = {{PerformanceEntry/duration}} * |w|.
  2. Let |total_weighted_duration| be the sum of |weighted_duration| values across all records.
  3. Let |sum_weights| be the sum of |w| values across all records.
  4. Let |debiased_mean| = |total_weighted_duration| / |sum_weights|, provided |sum_weights| is not near zero.
To compute debiased percentiles for both {{PerformanceTimingConfidenceValue/high}} and {{PerformanceTimingConfidenceValue/low}}:
  1. Follow the same steps as computing the debiased mean to compute a per-record weight |w|.
  2. Let |sum_weights| be the sum of |w| values across all records.
  3. Let |sorted_records| be all records sorted by {{PerformanceEntry/duration}} in ascending order.
  4. For a desired |percentile| (0-100), compute |q| = |percentile| / 100.0
  5. Walk |sorted_records| and for each record:
    • Compute cumulative weight |cw| per-record: |cw| = sum_{i: duration_i <= duration_j} w_i.
    • Compute debiased cumulative distribution function per-record: |cdf| = |cw| / |sum_weights|
  6. Find the first index |idx| with |cdf| >= |q|.
    • If |idx| is 0, return {{PerformanceEntry/duration}} for |sorted_records|[0].
    • If no such |idx| exists, return {{PerformanceEntry/duration}} for |sorted_records|[n].
  7. Compute interpolation fraction:
    • Let |lower_cdf| be |cdf| for |sorted_records|[idx-1]
    • Let |upper_cdf| be |cdf| for |sorted_records|[idx]
    • if |lower_cdf| = |upper_cdf|, return {{PerformanceEntry/duration}} for |sorted_records|[idx].
    • Otherwise:
      • Let |ifrac| = (|q| - |lower_cdf|) / (|upper_cdf| - |lower_cdf|)
      • Let |lower_duration| be {{PerformanceEntry/duration}} for |sorted_records|[idx-1]
      • Let |upper_duration| be {{PerformanceEntry/duration}} for |sorted_records|[idx]
      • return lower_duration + (upper_duration - lower_duration) * ifrac

ThetoJSON() method runs the [=default toJSON steps=] for [=this=].

NavigationTimingType enum

            enum NavigationTimingType {                "navigate",                "reload",                "back_forward"            };

The values are defined as follows:

navigate
Navigation where thehistory handling behavior is set to"default" or"replace".
reload
Navigation where the [=navigable=] wasreloaded.
back_forward
Navigation that'sapplied from history.

The format of the above enumeration value is inconsistent with the [=enumeration|WebIDL recommendation for formatting of enumeration values=]. Unfortunately, we are unable to change it due to backwards compatibility issues with shipped implementations. [[WebIDL]]

PerformanceTimingConfidence interface

          [Exposed=Window]          interface PerformanceTimingConfidence {              readonly attribute double randomizedTriggerRate;              readonly attribute PerformanceTimingConfidenceValue value;              object toJSON();          };
randomizedTriggerRate

This attribute must return a real number the interval [0, 1), indicating how often noise is applied when exposing the confidence {{PerformanceTimingConfidence/value}}.

value

This attribute must return a {{PerformanceTimingConfidenceValue}}.

toJSON()

This method runs the [=default toJSON steps=] for [=this=].

PerformanceTimingConfidenceValue enum

          enum PerformanceTimingConfidenceValue {            "high",            "low"          };

The values are defined as follows:

high
The user agent considers the navigation metrics to be representative on the current user's device.
low
The navigation metrics may not be representative of the current user's device. The user agent may consider the state of the machine, or user configuration.

When determining the [=underlying confidence value=], user agents MUST only base their decision ontransient runtime conditions, such as user agent startup, temporarily high CPU usage, temporary memory pressure, or other short-lived considerations.

User agents MUST NOT base the [=underlying confidence value=] on permanent device or profile characteristics. Examples of prohibited factors include the amount of physical RAM on the device, the number of CPU cores, the number of installed extensions, or other static environment settings.

Confidence is intended to reflect runtime variability rather than system capabilities.

Process

Processing Model

This figure illustrates the timing attributes defined by the {{PerformanceNavigationTiming}} interface. Attributes in parenthesis indicate that they may not be available for navigations involving documents from differentorigins.
Navigation Timing attributes

Creating a navigation timing entry

Each [=document=] has an associatednavigation timing entry, initially unset.

Tocreate the navigation timing entry for {{Document}} |document|, given a [=fetch timing info=] |fetchTiming|, a number |redirectCount|, a {{NavigationTimingType}} |navigationType|, a null or [=service worker timing info=] |serviceWorkerTiming|, a DOMString |cacheMode|, a {{DOMHighResTimeStamp}} |criticalCHRestart|, and a [=response body info=] |bodyInfo|, do the following:

  1. Let |global| be |document|'s [=relevant global object=].
  2. Let |navigationTimingEntry| be a new {{PerformanceNavigationTiming}} object in |global|'s [=global object/realm=].
  3. Setup the resource timing entry for |navigationTimingEntry| given "navigation", |document|'s {{Document/URL}}, |fetchTiming|, |cacheMode|, and |bodyInfo|.
  4. Set |navigationTimingEntry|'sdocument load timing to |document|'s [=Document/load timing info=]
  5. Set |navigationTimingEntry|'sprevious document unload timing to |document|'s [=Document/previous document unload timing=].
  6. Set |navigationTimingEntry|'sredirect count to |redirectCount|.
  7. Set |navigationTimingEntry|'snavigation type to |navigationType|.
  8. Set |navigationTimingEntry|'s [=PerformanceNavigationTiming/service worker timing=] to |serviceWorkerTiming|.
  9. Set |document|'snavigation timing entry to |navigationTimingEntry|.
  10. Set |navigationTimingEntry|'s`Critical-CH` restart time to |criticalCHRestart|.
  11. Set |navigationTimingEntry|'s [=PerformanceNavigationTiming/not restored reasons=] to the result ofcreating a NotRestoredReasons object given |document|'s [=Document/not restored reasons=].
  12. add |navigationTimingEntry| to |global|'sperformance entry buffer.

Toqueue the navigation timing entry for {{Document}} |document|,queue |document|'s [=navigation timing entry=].

Privacy Considerations

Information disclosure

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 [=same origin=] check algorithm when unloading a document, as detailed inthe HTML spec.

Therelaxed 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.

Cross-directory 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.

Security Considerations

The {{PerformanceNavigationTiming}} interface exposes timing information about the previous document to thecurrent document. To limit the access to {{PerformanceNavigationTiming}} attributes which include information on the previous document, theprevious document unloading algorithm enforces thesame origin policy and attributes related to the previous document are set to zero.

Detecting proxy servers

In case a proxy is deployed between the user agent and the web server, the time interval between theconnectStart and theconnectEnd 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.

Obsolete

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 arestrongly advised to use the new {{PerformanceNavigationTiming}} interface—seesummary of changes and improvements.

ThePerformanceTiming interface

[Exposed=Window]interface PerformanceTiming {  readonly attribute unsigned long long navigationStart;  readonly attribute unsigned long long unloadEventStart;  readonly attribute unsigned long long unloadEventEnd;  readonly attribute unsigned long long redirectStart;  readonly attribute unsigned long long redirectEnd;  readonly attribute unsigned long long fetchStart;  readonly attribute unsigned long long domainLookupStart;  readonly attribute unsigned long long domainLookupEnd;  readonly attribute unsigned long long connectStart;  readonly attribute unsigned long long connectEnd;  readonly attribute unsigned long long secureConnectionStart;  readonly attribute unsigned long long requestStart;  readonly attribute unsigned long long responseStart;  readonly attribute unsigned long long responseEnd;  readonly attribute unsigned long long domLoading;  readonly attribute unsigned long long domInteractive;  readonly attribute unsigned long long domContentLoadedEventStart;  readonly attribute unsigned long long domContentLoadedEventEnd;  readonly attribute unsigned long long domComplete;  readonly attribute unsigned long long loadEventStart;  readonly attribute unsigned long long loadEventEnd;  [Default] object toJSON();};

All time values defined in this section are measured in milliseconds since midnight of.

navigationStart

This attribute must return the time immediately after the user agent finishesprompting to unload the previous document. If there is no previous document, this attribute must return the time the current document is created.

This attribute is not defined for {{PerformanceNavigationTiming}}. Instead, authors can use {{Performance/timeOrigin}} to obtain an equivalent timestamp.

unloadEventStart

If the previous document and the current document have the sameorigin, this attribute must return the time immediately before the user agent starts theunload event of the previous document. If there is no previous document or the previous document has a differentorigin than the current document, this attribute must return zero.

unloadEventEnd

If the previous document and the current document have the samesame origin, this attribute must return the time immediately after the user agent finishes theunload event of the previous document. If there is no previous document or the previous document has a differentorigin than the current document or the unload is not yet completed, this attribute must return zero.

If there areHTTP redirects when navigating and not all the redirects are from the sameorigin, both {{PerformanceTiming.unloadEventStart}} and {{PerformanceTiming.unloadEventEnd}} must return zero.

redirectStart

If there areHTTP redirects when navigating and if all the redirects are from the sameorigin, this attribute must return thestarting time of the fetch that initiates the redirect. Otherwise, this attribute must return zero.

redirectEnd

If there areHTTP redirects when navigating and all redirects are from the sameorigin, 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

If the new resource is to befetched using a "GET"request method, fetchStart must return the time immediately before the user agent starts checking the [[RFC7234|HTTP cache]]. Otherwise, it must return the time when the user agent startsfetching the resource.

domainLookupStart

This attribute must return the time immediately before the user agent starts the domain name lookup for the current document. If apersistent connection [[RFC2616]] is used or the current document is retrieved from the [[RFC7234|HTTP cache]] or local resources, this attribute must return the same value as {{PerformanceTiming.fetchStart}}.

domainLookupEnd

This attribute must return the time immediately after the user agent finishes the domain name lookup for the current document. If apersistent connection [[RFC2616]] is used or the current document is retrieved from the [[RFC7234|HTTP cache]] or local resources, this attribute must return the same value as {{PerformanceTiming.fetchStart}}.

Checking and retrieving contents from the HTTP cache [[RFC2616]] is part of thefetching process. It's covered by the {{PerformanceTiming.requestStart}}, {{PerformanceTiming.responseStart}} and {{PerformanceTiming.responseEnd}} attributes.

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

This attribute must return the time immediately before the user agent start establishing the connection to the server to retrieve the document. If apersistent connection [[RFC2616]] is used or the current document is retrieved from the [[RFC7234|HTTP cache]] or local resources, this attribute must return value of {{PerformanceTiming.domainLookupEnd}}.

connectEnd

This attribute must return the time immediately after the user agent finishes establishing the connection to the server to retrieve the current document. If apersistent connection [[RFC2616]] is used or the current document is retrieved from the [[RFC7234|HTTP cache]] or local resources, this attribute must return the value of {{PerformanceTiming.domainLookupEnd}}.

If the transport connection fails and the user agent reopens a connection, {{PerformanceTiming.connectStart}} and {{PerformanceTiming.connectEnd}} should return the corresponding values of the new connection.

{{PerformanceTiming.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

This attribute is optional. User agents that don't have this attribute available must set it as undefined. When this attribute is available, if thescheme [[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

This attribute must return the time immediately before the user agent starts requesting the current document from the server, or from the [[RFC7234|HTTP cache]] or from local resources.

If the transport connection fails after a request is sent and the user agent reopens a connection and resend the request, {{PerformanceTiming.requestStart}} should return the corresponding values of the new request.

This interface does not include an attribute to represent the completion of sending the request, e.g., requestEnd.

  • 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.
  • Some user agents have high cost to determine the actual completion time of sending the request due to the HTTP layer encapsulation.
responseStart

This attribute must return the time immediately after the user agent receives the first byte of the response from the server, or from the [[RFC7234|HTTP cache]] or from local resources.

responseEnd

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, the [[RFC7234|HTTP cache]] or from local resources.

domLoading

This attribute must return the time immediately before the user agent sets thecurrent document readiness to"loading".

Due to differences in when a Document object is created in existing user agents, the value returned by thedomLoading is implementation specific and should not be used in meaningful metrics.

domInteractive

This attribute must return the time immediately before the user agent sets thecurrent document readiness to"interactive".

domContentLoadedEventStart

This attribute must return the time immediately before the user agent firesthe DOMContentLoaded event at theDocument.

domContentLoadedEventEnd

This attribute must return the time immediately after the document'sDOMContentLoaded event completes.

domComplete

This attribute must return the time immediately before the user agent sets thecurrent document readiness to"complete".

If thecurrent document readiness changes to the same state multiple times, {{PerformanceTiming.domLoading}}, {{PerformanceTiming.domInteractive}}, {{PerformanceTiming.domContentLoadedEventStart}}, {{PerformanceTiming.domContentLoadedEventEnd}} and {{PerformanceTiming.domComplete}} must return the time of the first occurrence of the correspondingdocument readiness change.

loadEventStart

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

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()
Runs the [=default toJSON steps=] for [=this=].

ThePerformanceNavigation interface

[Exposed=Window]interface PerformanceNavigation {  const unsigned short TYPE_NAVIGATE = 0;  const unsigned short TYPE_RELOAD = 1;  const unsigned short TYPE_BACK_FORWARD = 2;  const unsigned short TYPE_RESERVED = 255;  readonly attribute unsigned short type;  readonly attribute unsigned short redirectCount;  [Default] object toJSON();};
TYPE_NAVIGATE

Navigation where thehistory handling behavior is set to"default" or"replace".

TYPE_RELOAD

Navigation where thehistory handling behavior is set to"reload".

TYPE_BACK_FORWARD

Navigation where thehistory handling behavior is set to"entry update".

TYPE_RESERVED

Any navigation types not defined by values above.

type

This attribute must return the type of the last non-redirectnavigation. It must have one of the followingnavigation type values.

Client-side redirects, such as those usingthe Refresh pragma directive, are not consideredHTTP redirects by this spec. In those cases, thetype attribute should return appropriate value, such asTYPE_RELOAD if reloading the current page, orTYPE_NAVIGATE if navigating to a new URL.

redirectCount

This attribute must return the number of redirects since the last non-redirect navigation. If there is no redirect or there is any redirect that is not from thesame origin as the destination document, this attribute must return zero.

toJSON()
Runs the [=default toJSON steps=] for [=this=].

Extensions to thePerformance interface

        [Exposed=Window]        partial interface Performance {          [SameObject]          readonly attribute PerformanceTiming timing;          [SameObject]          readonly attribute PerformanceNavigation navigation;        };

ThePerformance interface is defined in [[PERFORMANCE-TIMELINE-2]].

timing

Thetiming attribute represents the timing information since the last non-redirect navigation. This attribute is defined by thePerformanceTiming interface.

navigation

Thenavigation attribute is defined by thePerformanceNavigation interface.

Acknowledgments

Thanks to Anne Van Kesteren, Arvind Jain, Boris Zbarsky, Jason Weber, Jonas Sicking, James Simonsen, Karen Anderson, Nic Jansma, Philippe Le Hegaret, Steve Souders, Todd Reifsteck, Tony Gentilcore, William Chan and Zhiheng Wang for their contributions to this work.


[8]ページ先頭

©2009-2026 Movatter.jp