Click here to Skip to main content
13,202,151 members (53,633 online)
Click here to Skip to main content
Add your own
alternative version


4 bookmarked
Posted 29 Aug 2014

How speedy.js is Your Web Site?

, 29 Aug 2014
Rate this:
Please Sign up or sign in to vote.
How speedy.js is your web site?

As a performance officer, I recently watched a presentation by Lara Callender Swanson about how Etsy moved towards a culture of performance and mobile web by educating, incentivizing and empowering everyone who works at Etsy.

Inspired by a repo on github and StackExchange‘s Miniprofiler, I’ve created a very simple script to display Navigation Timing stats at the top of a web page.

Navigation Timing is a JavaScript API for accurately measuring performance on the web. The API provides a simple way to get accurate and detailed timing statistics—natively—for page navigation and load events. It has always been a small challenge to measure the time it takes to fully load a page, but Navigation Timing API now makes this easy for all of us.

It’s important to understand that Navigation Timing data is very similar to network stats in developer tools.


Can I Use …?

Navigation Timing API is now supported by all major browsers (Can I use …?). Google Analytics and RUM services use it since a long time ago. In case it’s not supported by your browser, an error message will be displayed.


No message => don’t hesitate to create an issue on github.

Mobile Ready?

This is maybe the most interesting part. Developer tools are not available on mobile/tablet version so you don’t have any chance to evaluate page load time and to explain why it may be slow.

On Production?

Of course, it’s not recommended to display this kind of data to your users, but you may find several ways to use it on production. There are browser extensions to inject custom JavaScripts into any website (Cjs, Greasemonkey) ; Fiddler allows you to automatically inject scripts into a page (stackoverflow).

Here is an example on my stackoverflow profile:


To conclude, don’t forget that Performance is a feature! Displaying page load time on each page and to everyone is a great chance to detect performance issues early. Does a page violate your SLA? I think it’s now a little easier with this script.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Technical Lead
France France
Yet another proof of concept

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.171020.1 | Last Updated 29 Aug 2014
Article Copyright 2014 by Cybermaxs
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid