Search code examples
javascriptperformancemonitoringclient-sidetiming

What is the best way to measure Client Side page load times?


I'm looking to monitor the end user experience of our website and link that with timing information already logged on the server side. My assumption is that this will require javascript to to capture time stamps at the start of request (window.onbeforeunload) and at the end of loading (window.onload). Basically this - "Measuring Web application response time: Meet the client"

  1. Is there a better approach?
  2. What kind of performance penalty should I be expecting (order of magnitude)?
  3. How good are the results?

Solution

  • EDIT (2013): try Boomerang instead, like @yasei-no-umi suggests. It's actively maintained.

    -- old answer --

    We use Jiffy.

    It's very simple to use and modify - we wrote our own server-side code (instead of Jiffy's Apache + perl) and used Jiffy's JS.

    Regarding a performance penalty - there isn't one on the client side. The JS itself is trivially fast, and the reporting back to the server can be done with an XHR after page load, which affects nothing in the user experience. On the server side you'll get twice as many requests. If that's a bottleneck, you could set up a different server just for the timing responses.