Resource Timing (original) (raw)

Abstract

This specification defines an interface for web applications to access timing information related to HTML 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 a work in progress and may change without any notices.

This is the Last Call Working Draft of the Resource Timing specification. Please send comments to public-web-perf@w3.org (archived) with [ResourceTiming] at the start of the subject line by 15 September 2011.

A diff document with the previous draft is available.

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.

You can find the latest Editor's Draft of this document in the W3C's Mercurial repository, which is updated on a regular basis.

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.

Implementers should be aware that this document is not stable. Implementers who are not taking part in the discussions are likely to find the specification changing out from under them in incompatible ways. Vendors interested in implementing this document before it eventually reaches the Candidate Recommendation stage should join the aforementioned mailing lists and take part in the discussions.

Table of Contents

  1. 1Introduction
  2. 2Conformance requirements
  3. 3 Terminology
  4. 4 Resource Timing
    1. 4.1 Introduction
    2. 4.2 Resources Included in the PerformanceResourceTiming Interface
    3. 4.3 The window.performance Attribute
    4. 4.4 The PerformanceResourceTiming Interface
    5. 4.5 The Resource Timing Methods
    6. 4.6 Cross-origin Resources
    7. 4.7 Vendor Prefixes
  5. 5 Process
    1. 5.1 Processing Model
    2. 5.2 Monotonic Clock
  6. 6 Privacy
  7. 7 Security
  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. While Navigation Timing [NavigationTiming] addresses part of the problem by providing timing information associated with a navigation, this document introduces the ResourceTiminginterface to allow Javascript mechanisms to collect complete timing information related to resources on a document.

For example, the following Javascript shows a simple attempt to measure the time it takes to fetch a resource: