Skip to main content
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
We have just launched
www.safari.co.uk, and its working really nice - apart from the speed. We really need to improve page load times and optimise the image library.
Can anyone sign post me to ideas / guidelines. I think there is a lot of performance to be gained in the cache of cropped images that could be served as static image instead of having to pass through the GD library everytime (or is this already happening?).
Thanks in advance for any pointers!
Images don't get passed through the GD library every time, only when they are first resized. It then checks if a resized image exists and serves it if it does.
I agree with Swaiba - partial caching & static publishing help a lot, partial caching alone recently saved us about 30% on loading times.
Thanks for this. Also applied these htaccess rules which have helped a lot...
ExpiresByType text/html "access plus 7 day"
ExpiresByType text/js "access plus 7 day"
ExpiresByType image/gif "access plus 7 day"
ExpiresByType image/png "access plus 7 day"
ExpiresByType image/jpg "access plus 7 day"
ExpiresByType image/jpeg "access plus 7 day"
ExpiresByType image/ico "access plus 7 day"
ExpiresByType text/css "access plus 7 day"
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0 no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Don't compress images, movies or zip files
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:avi|mov|mp3|mp4|rm|flv|swf|mp?g)$ no-gzip dont-vary
# properly handle requests coming from behind proxies
Header append Vary User-Agent
Will work on the partial cache soon, just need to work out what elements can be cached like that. Also setting up a varnish server as a test.