In the fourth part of our multipart Frontend Optimization series I’ll cover my notes from Steve Souder’s “High Performance Websites” and “Even Faster Websites” books that can help reduce your file sizes and configure your Apache settings to squeeze out more speed.
Reduce File Sizes
- See optimizing images for reducing image sizes.
- Minify CSS and JS files. Use Google’s Closure Compiler for JS and ICEY for CSS.
- Minify HTML files with HTML Tidy.
- Reduce file size with using relative links including //subdomain.example.com instead of http://subdomain.example.com
Configure Apache and .htaccess
- Disable ETags
- Add future expires headers
- Enable GZip Compression
- Since 15% of users don’t have gzip due to proxies you can override that with gzip detection. See page 130 of “Even Faster Websites” for detailed description on solving this problem.