A small JavaScript library that wraps around the Navigation Timing API providing information on user experience.
###Syntax:
You can view the stats by printing them to the console or as a graph in a web page.
perform.stats(); //Print to the browser console
perform.stats(true); //Appends a graph to the document body element that compares the stats in a timeline format
###Currently measuring:
- Page Load Time
- Network Latency
- Connection Time
- DNS Latency
- Document Load TIme
###TODO:
- Subtract the time the script loads from the stats so that we can get an accurate measure of performance.
- Continue tweaking the appearance of the graph displayed in the browser so that it can better represent how different stats compare to page load time.
###Learning Resources
- Navigation Timing -The W3C specication of the Navigation Timing API.
- Measuring Page Load Speed with Navigation Timing - An article from HTML5ROCKS that gives a good introduction to the API.
- Making Facebook 2x Faster - A good read on website performance optimization from facebook documenting some techniques they used to make their site 2x faster.