O'Reilly logo

PhantomJS Cookbook by Rob Friesel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Executing a detailed performance analysis

This recipe introduces the YSlow library for PhantomJS and illustrates how to perform a detailed performance analysis of a web page.

Getting ready

To run this recipe, we will need a target URL.

We will use the PhantomJS port of the YSlow library to execute the performance analysis on our target web page.

Note

YSlow is a library that analyzes web pages and produces a report on that page's performance, grading it against benchmarks and rules established by Yahoo! web performance experts. We can find out more about YSlow for PhantomJS on the project site at http://yslow.org/phantomjs/.

The examples that follow assume version 3.1.8 of the YSlow library, which is included with the sample code repository.

YSlow is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required