Definitely, I find the way how to make required optimization for my site in simple and beautiful way.
Some time ago I wrote about good optimization, but changes in core kill the idea. I was thinking about plugin to make required things:
- collect styles/scripts and concatenate them into solid files
- minify styles
- translate images to data:uri if possible
Yes, this is not a big deal, but I want to have all of this with more ability
Use dynamic path as version info instead of parameters
This page links styles by uri
Are you see ’17ea6fc138d8207dc87dcb419cd5ebec’ in the path ? This is the key. All information about style files and conditions ( to convert images to data:uri or not ) keeps in plugin options by this key. The result styles composed from several files, minified and provided to the user with length and content type.
Of course this task need some time. But I fully control cache parameters in response and can ask browser to keep file forever, because any changes will drive to change the key.
But this is not enough to make me happy. Any other user can load my server with build styles and script again. To prevent this wasted workload I ask wp-super-cache to keep results.
This plugin do very important thing for cheap site optimization. Super-Cache used apache rewrites to use file cache instead of run php engine. This feature improve performance more then 10 times.
But before Super-Cache works only for page body. Now it’s used for styles and scripts. By this step I mostly remove server CPU loading. And only the network speed and size can be an issue.
At the end I make the plugin for all requirements and now it’s working on my site ! So today I am happy
Here is pingdom view for my site now.