61 | | Optimise by using GZip & Expires |
| 64 | Optimise by using [http://httpd.apache.org/docs/2.2/mod/mod_deflate.html GZip] & [http://httpd.apache.org/docs/2.2/mod/mod_expires.html Expires]: |
| 65 | {{{ |
| 66 | ### static files do not need WSGI |
| 67 | <LocationMatch "^(/[\w_]*/static/.*)"> |
| 68 | Order Allow,Deny |
| 69 | Allow from all |
| 70 | |
| 71 | SetOutputFilter DEFLATE |
| 72 | BrowserMatch ^Mozilla/4 gzip-only-text/html |
| 73 | BrowserMatch ^Mozilla/4\.0[678] no-gzip |
| 74 | BrowserMatch \bMSIE !no-gzip !gzip-only-text/html |
| 75 | SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary |
| 76 | Header append Vary User-Agent env=!dont-vary |
| 77 | |
| 78 | ExpiresActive On |
| 79 | ExpiresByType text/html "access plus 5 minutes" |
| 80 | ExpiresByType text/css "access plus 1 week" |
| 81 | ExpiresByType image/gif "access plus 1 week" |
| 82 | ExpiresByType image/jpeg "access plus 1 week" |
| 83 | ExpiresByType image/jpg "access plus 1 week" |
| 84 | ExpiresByType image/png "access plus 1 week" |
| 85 | ExpiresByType application/x-shockwave-flash "access plus 1 week" |
| 86 | </LocationMatch> |
| 87 | }}} |