Of course W3TC also offers minification-options, but according to the developers, this option is too agressive and will not play nice with every plugin and theme. Luckily, Autoptimize does one thing and it does it very well: minification. Also, it’s built to be used in combination with W3 Total Cache, so you will not face any compatibility issues.
When setup correctly, Autoptimize takes care of the following suggestions in Pingdom and Pagespeed Insights:
- Minimize DNS lookups
- Combine external CSS
- Minify CSS
- Minify HTML
Don’t worry, setting it up will be a breeze. Let’s begin!
After activating the Autoptimize plugin its settings-page will appear under ‘Settings » Autoptimize’. As I mentioned before, setting up the basics will be easy. Follow the steps as shown in the screenshot (click to enlarge):
- Enable ‘Optimize HTML Code’
- Enable ‘Optimize CSS Code’
- And when you feel you’re ready to play with the big boy toys, click ‘Show advanced settings’
By default, Autoptimize aggregates all enqueued script-files into one single .js-file and places it in the footer of the page. It also adds a defer-parameter to optimize page load.
Both these actions will make Google Pagespeed Insights and Pingdom very happy. It also gathers all CSS-files and places them into one single file.
- Enable ‘Also aggregate inline JS?’
- Enable ‘Also aggregate inline CSS?’
- Save settings
That’s it! You’re all done setting up Autoptimize.