Automating YSlow and PageSpeed using Xvfb

I’d like to welcome Aaron Kulick to ShowSlow team!

Aaron was active user and contributed a few patches and then started to actively contribute documentation to the project wiki:

Now Aaron is a full-blown contributor with SVN access and his first contribution is solving the most common problem – how do we automate YSlow and PageSpeed in a headless mode.

He created an automation section in the repository, feel free to check out his code and share your experience:

In two words, all you need to do is:

  • Run a memory framebuffer server (Xvfb)
  • Then configure Firefox profile(s) with different settings disabling some features that require user intervention and enable autorunning the extensions and beacons
  • Then you just create a list of URLs to test and feed it to script that will launch Firefoxes appropriately is a simple shell wrapper around the harness script that you can simply run from the cron job.

For more information read the README file and I hope we’ll have more documentation on as well!

Please join me in thanking Aaron for this important tool!

Also, just a reminder, if you are not subscribed to a mailing list / google group, you can do that here:

8 thoughts on “Automating YSlow and PageSpeed using Xvfb”

  1. Thanks to share. Regarding performances, how does it perform? Would it be better to have only one instance, opening tab in it and close it after yslow and pagespeed are dumped?

  2. You might hit troubles with cache and all if you just reuse tabs. More over, opening tabs and closing them is not that easy to automate. We’ll definitely be optimizing for better performance if that would be possible without sacrificing results.

  3. thanks for the answer.

    would you mine sharing your pref.js. It probably contains the best options :)

  4. Thanks for post.

    i have encounter a error when i run the in Ubuntu

    “Can’t locate in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at line 100.
    BEGIN failed–compilation aborted at line 100.”

    So i just modify “use POE” to “cpan POE”

    then i got

    “Bareword “KERNEL” not allowed while “strict subs” in use at ./ line 259.
    Bareword “HEAP” not allowed while “strict subs” in use at ./ line 259.
    Global symbol “$poe_kernel” requires explicit package name at ./ line 463.
    Execution of ./ aborted due to compilation errors.”

    What can i do for this?



Leave a Reply