Your browser, your page, your scripts!
JavaScript Other
Latest commit c3f86fd Jan 16, 2017 @soulgalore soulgalore changes
Failed to load latest commit information.
bin Run Xvfb from node (#219) Nov 11, 2016
browserscripts Renamed timings script to pageTimings (#182) Aug 30, 2016
browsersupport/firefox-profile/chrome Hide status bar in Firefox to get valid speedindex (#143) Jun 1, 2016
docker/scripts trap inspired by docker selenium Dec 12, 2016
docs Renamed pre/postTask to pre/postScripts + load scripts inside the eng… Jun 4, 2016
lib only use pushStart to signal if a a response is server pushed in Chrome Jan 16, 2017
test submit the form for the joy of it Jan 13, 2017
tools Strip Selenium specific things from the Chrome log (#157) Jun 17, 2016
vendor Eliminate the risk to get a too early first visual change (#255) Jan 9, 2017
.dockerignore Add a Dockerfile for running Browsertime. Aug 31, 2016
.eslintignore Renamed pre/postTask to pre/postScripts + load scripts inside the eng… Jun 4, 2016
.eslintrc Add eslint config and fix minor lint issues. Mar 11, 2015
.eslintrc.yaml Check for bitwise operators in eslint. Mar 29, 2016
.gitignore Adding vscode to gitignore Nov 8, 2016
.travis.yml rename speedindex to speedIndex Nov 30, 2016 changes Jan 16, 2017 new path to issues [skip ci] Oct 6, 2013
Dockerfile Updated the Docker container to use ImageMagick 6.9.7-2 to fix firstV… Jan 4, 2017
LICENSE first commit Aug 23, 2013 cleaner docker run Jan 4, 2017
appveyor.yml Install java on AppVeyor CI. Oct 14, 2015
browsertime.png hello world Jun 23, 2016
circle.yml Initial configuration for tests on CircleCI. Mar 31, 2016
index.js Camel case all the things! Feb 23, 2016
package.json 1.0.0-beta.23 Jan 10, 2017 empty node modules Jan 10, 2017

Browsertime - Your browser, your page, your scripts!

Build status Downloads Stars


Access the Web Performance Timeline, from your browser, in your terminal!

Browsertime allows you to:

  1. Query timing data directly from the browser, to access Navigation Timing, User Timing, Resource Timing, first paint and RUM Speed Index.
  2. Generate HAR files (using HAR Export trigger for Firefox and parsing the Chrome log for Chrome).
  3. Run custom Javascript scripts in the browser and get statistics for each run.

A simple example

$ bin/browsertime.js

Load in Chrome three times. Results are stored in a json file (browsertime.json) with the timing data, and a har file (browsertime.har) in browsertime-results/$date/

I want more examples

Checkout the examples.


Browsertime supports Firefox and Chrome on desktop. On Android we support Chrome. Yep that's it for now.

But we want to support Opera (on Android) and when Safari 10 is available, we will add it too. And when(?!) iOS Safari supports WebDriver we will add that too.

How does it work

Browsertime uses Selenium NodeJS to drive the browser. It starts the browser, load a URL, executes configurable Javascripts to collect metrics, collect a HAR file.

To get the HAR from Firefox we use the HAR Export Trigger and Chrome we parse the timeline log and generates the HAR file.

Oh and you can run your own Selenium script before (--preScript) and after (--postScript) a URL is accessed so you can login/logout or do whatever you want.

Test using Docker

You can build and test changes using Docker locally. Using Docker is cool because we have ready made containers with Firefox/Chrome and all the dependencies needed for running VisualMetrics to get SpeedIndex.

$ docker build -t sitespeedio/browsertime .
$ docker run --privileged --shm-size=1g --rm -v "$(pwd)":/browsertime-results sitespeedio/browsertime -n 1 -c cable --video --speedIndex

The rewrite to 1.0

The master is to a large degree a re-write of the internal implementation, the cli interface, and the node API. It's based on learnings from the previous releases of Browsertime, and their use in It's still lacking some features from the 0.x releases, and the API is not final. However it should be a better foundation for future development, using more modern Javascript features and a much more extensive test suite.

With 1.0 we dropped BrowsermobProxy so you don't need Java 😄 to run anymore and each run will be 1000% faster. Also we now support HTTP/2 and pre and post selenium scripts, if you want to do things before the URL is tested.

If you would would like to get started there are a few examples that can be found in the docs folder. If you run into any issues getting started using Browsertime visit our Issues Page for some common issues/solutions. If you still cannot resolve the problem and feel the issue is within browsertime feel free to open an issue.