Perhaps I should have called the post "Client Side Performance Optimization for Server Side Nerds." ;)
— Joshua Mervine (@mervinej) June 30, 2013
Yesterday I included it in my nginx configurations for mervine.net to give it try. This post is not about how to build and install this module. Google's documentation is perfect. This post is about how I chose to configure
ngx_pagespeed and the immediate performance gains I saw.
After spending about an hour reading through the various filters for
ngx_pagespeed, I settled on the following configuration:
Note: there are a few really good filters that I excluded here, mostly because they weren't applicable to my site. Either I'm not making a mistake if fixes, or don't use the element it addresses. Read the docs, choose your own.
I used a gem I've been working on (Autobench [shameless plug?]) to take a snap shot of a page from my site before and after implementing these changes (and once in between to optimize). Here's a quick view of the results.
< BEFORE > AFTER # yslow - yslow.js < requests: 54 > requests: 45 < loadtime: 1415 > loadtime: 1007 # client - phantomas < httpTrafficCompleted: 1530.0 > httpTrafficCompleted: 1401.0 < onDOMReadyTime: 107.0 > onDOMReadyTime: 19.0 < windowOnLoadTime: 807.0 > windowOnLoadTime: 658.0