Navigation Timing (original) (raw)

Abstract

This specification defines an interface for web applications to access timing information related to navigation and elements.

Status of this document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

This is the Last Call Working Group of the NavigationTiming specification. Please send comments to public-web-perf@w3.org (archived) with [NavigationTiming] at the start of the subject line by 8 February 2011.

A diff document with the previous draft is available.

Note: Feedback would be especially appreciated regarding the use of window.performance attribute and the potential to conflict with existing Web pages.

This document is produced by the Web Performance Working Group. The Web Performance Working Group is part of the Rich Web Clients Activity in the W3C Interaction Domain.

Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

Table of Contents

  1. 1Introduction
  2. 2Conformance requirements
  3. 3 Terminology
  4. 4 Navigation Timing
    1. 4.1 Introduction
    2. 4.2 The PerformanceTiming interface
    3. 4.3 The PerformanceNavigation interface
    4. 4.4 The window.performance attribute
    5. 4.5 Processing Model
    6. 4.6 Garbage Collection
  5. 5 Privacy
  6. 6 Security
  7. 7 References
  8. Acknowledgements

1 Introduction

This section is non-normative.

User latency is an important quality benchmark for Web Applications. While JavaScript-based mechanisms can provide comprehensive instrumentation for user latency measurements within an application, in many cases, they are unable to provide a complete end-to-end latency picture.

For example, the following Javascript shows the time it take to fully load a page:

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

To address the need for complete information on user experience, this document introduces the PerformanceTiminginterfaces. This interface allows JavaScript mechanisms to provide complete client-side latency measurements within applications. With the proposed interface, the previous example can be modified to measure a user's perceived page load time.

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