Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

WEB TIMING

Page performance is always an area of concern for web developers. Up until recently, the only way to measure in-page performance characteristics was through increasingly complex and clever uses of the JavaScript Date object. The Web Timing API changes that by exposing internal browser metrics through a JavaScript API, allowing developers to directly access this information and do as they please with it. Unlike other APIs in this chapter, Web Timing is actually already a W3C Recommendation, though its adoption by browsers is relatively slow.

The center of Web Timing is the window.performance object. All metrics related to the page, both those already defined and those in the future, exist on this object. The Web Timing specification starts by defining two properties of performance.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint