Details
Page Speed Enhancements
By Paul
Sep 09, 2016 am30 12:22 AM (Edited )
I've been working through the recommendations in google's mobile site speed test. Two big things that I found missing are gzip compression and caching rules, and I've just added a new setting on the SEO page for that. When the caching/compression setting is enabled, WSN will now set all images css and js files to be cached for a long period. To try to prevent this from being problematic when you try to update them, I've also added an eTag rule which should force caches to update whenever the file size changes. Then for compression, all applicable file types are set to automatically be gzip compressed -- if your server has mod_deflate, can't help you if it doesn't.
I can only hope there won't be any apache configurations which barf on these rules, I've conditionalized everything that I know is conditional. If you have a problem with it on your apache server, do let me know. Those of you not on Apache will not be able to take advantage of this, unfortunately -- with the possible exception of litespeed and such slimmed apache look-alikes, but haven't tested them.
There is a risk that the etag definitions may not work on all sites -- some of the internet has reported it only working from httpd.conf and not from .htaccess. If that's your situation, you may end up finding that you and your visitors keep seeing old versions of files after you've changed them. In that case, you will need to turn off the caching/compression option.
Next up will be CSS minification. I'll need to integrate a CSS minifier script and switch all references in the source from the current stylesheets to new .min.js versions, perhaps in a templates/styles/production/ subdirectory. This will have the disadvantage of making it impossible to immediately see changes if editing the regular .css file via FTP (rather than through the admin panel), so I may make it optional.
By Paul
Sep 09, 2016 am30 12:22 AM (Edited )
I can only hope there won't be any apache configurations which barf on these rules, I've conditionalized everything that I know is conditional. If you have a problem with it on your apache server, do let me know. Those of you not on Apache will not be able to take advantage of this, unfortunately -- with the possible exception of litespeed and such slimmed apache look-alikes, but haven't tested them.
There is a risk that the etag definitions may not work on all sites -- some of the internet has reported it only working from httpd.conf and not from .htaccess. If that's your situation, you may end up finding that you and your visitors keep seeing old versions of files after you've changed them. In that case, you will need to turn off the caching/compression option.
Next up will be CSS minification. I'll need to integrate a CSS minifier script and switch all references in the source from the current stylesheets to new .min.js versions, perhaps in a templates/styles/production/ subdirectory. This will have the disadvantage of making it impossible to immediately see changes if editing the regular .css file via FTP (rather than through the admin panel), so I may make it optional.
Views | 631 views. Averaging 631 views per day. | ||||||||||
Similar Listings |
|
Sorry, you don't have permission to post. Log in, or register if you haven't yet.
Please login or register.