- Use mod_pagespeed
- Use mod_expires
- Use mod_deflate
- Avoid .htaccess
- PHP ob_gzhandler
- Use CSS Sprites
- Combine and Minify
- Compress Components
- Compress Images
- Limit Cookies
- Parallel Downloads
These HTTP headers are an instruction to the client about the document's validity and persistence. If cached, the document may be fetched from the cache rather than from the source until this time has passed. After that, the cache copy is considered "expired" and invalid, and a new copy must be obtained from the source. Read more .
Some popular browsers cannot handle compression of all content so you may want to set the gzip-only-text/html note to 1 to only allow html files to be compressed (see below). If you set this to anything but 1 it will be ignored.
If you want to restrict the compression to particular MIME types in general, you may use the AddOutputFilterByType directive. Read more.
Many web servers can compress files in gzip format before sending them for download, either by calling a third-party module or using built-in routines. To enable compression, configure your web server to set the Content-Encoding header to gzip format for all compressible resources. You can also use deflate, which uses the same compression algorithms, but it is not widely used, so we recommend gzip. Read more.
- Eliminate unnecessary cookies.
- Keep cookie sizes as low as possible to minimize the impact on the user response time.
- Be mindful of setting cookies at the appropriate domain level so other sub-domains are not affected.
- Set an Expires date appropriately. An earlier Expires date or none removes the cookie sooner, improving the user response time.
Maximizing parallel downloads doesn’t come without a cost. Depending on your bandwidth and CPU speed, too many parallel downloads can degrade performance.
Increase the number of parallel downloads by using at least two, but no more than four hostnames. Once again, this underscores the number one rule for improving response times: reduce the number of components in the page. Read more.