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 YSlow performance analysis with a custom ruleset

In this recipe, we will create a custom-defined ruleset for YSlow and execute a performance analysis with it.

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. However, as we are creating a custom ruleset, we must build the library from source. To obtain the YSlow library source code, we change directories into the sample code repository and initialize the submodule as shown in the following command:

git submodule init && git submodule update

Tip

Alternatively, we can click the download link on the project's GitHub page https://github.com/marcelduran/yslow.

If we download ...

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