This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

Performance

Summary

The HTML5 specification defines a Window interface, which this specification extends.

Properties

navigation
Represents the navigation information related to the browsing context. This attribute is defined by the PerformanceNavigation interface.
timing
Represents the timing information related to the browsing contexts since the last non-redirect navigation. This attribute is defined by the PerformanceTiming interface.

Methods

No methods.

Events

No events.

Examples

The following script calculates how much time to load a page since the most recent navigation.

<html>
<head>
<script type="text/javascript">
function onLoad() {
  var now = new Date().getTime();
  var page_load_time = now - performance.timing.navigationStart;
  alert("User-perceived page loading time: " + page_load_time);
}
</script>
</head>
<body onload="onLoad()">
<!- Main page body goes from here. -->
</body>
</html>

Related specifications

W3C Navigation Timing Specification
W3C Editor’s Draft

Attributions