Automating YSlow score using webpagetest, yslow command line and node js

The following is the sequence to generate the YSLOW score using script.

1. Create the environment

  • Install node js on RHEL :
    sudo yum localinstall --nogpgcheck nodejs-stable-release.noarch.rpm
    sudo yum install nodejs-compat-symlinks npm
  • Install YSlow commandline as explained in
    sudo npm install yslow -g

    The following error is OK

    > contextify@0.1.2 install /usr/lib/node_modules/yslow/node_modules/jsdom/node_modules/contextify
    > node-gyp rebuild
            throw e; // process.nextTick error, or 'error' event on first tick
    Error: Cannot find module '/usr/lib/nodejs/npm/node_modules/node-gyp/bin/node-gyp.js'
        at Function._resolveFilename (module.js:332:11)
        at Function._load (module.js:279:25)
        at Array.0 (module.js:479:10)
        at EventEmitter._tickCallback (node.js:192:40)
    npm WARN optional dependency failed, continuing contextify@0.1.2
    /usr/bin/yslow -> /usr/lib/node_modules/yslow/bin/yslow
    yslow@3.1.0 /usr/lib/node_modules/yslow
    ├── commander@0.5.2
    └── jsdom@0.2.13

2. Get Key for accessing the REST apis

  • Send mail to with the following details
    • Purpose of the use
    • Number of API calls/day

3. Write script to get the HAR file from and generate the Yslow file

Notes :

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: