Page cache
Enabling the cache will store compressed versions of previously viewed pages and serve them to anonymous users. If a user is logged-in, pages have to be built from scratch, because authenticated users may have custom elements.
- Navigate to the Performance settings page (admin/settings/performance).
- Set Caching mode to Normal (recommended, no side effects).
- Set Minimum cache lifetime to 1 day.
- Save configuration.
Bandwidth optimizations
Enabling aggregation and compression of CSS files will combine all the various style sheets into one compressed file. This means fewer HTTP requests for everyone. Temporarily disable this feature when working on CSS files or enabling modules with their own style sheets.
- Navigate to the Performance settings page (admin/settings/performance).
- Set Aggregate and compress CSS files to Enabled
- Save configuration.
I am not sure how the resulting CSS file's name is generated. Enabling and disabling the aggregation a few times always resulted in the same file name for me. My first guess is that it is an md5 of the current date. I don't feel like digging into Core to find out for sure, so I'm just going to try it again tomorrow and see if it's different. I think a nice way to do it would be to first create a temp file, make a checksum hash of this temp file, and create the new CSS file named after that. This would insure you got a new file name every time changes were made to one or more of the files being aggregated. Which is what you want.
Enable Default 404 Handling for Some
Drupal's custom 404 handling requires a full page load for every missing file. It isn't necessarily critical that Drupal handles all of these errors. To re-enable Apache's default 404 handling for specific file types make the following changes to .htaccess.
Find:
Replace:
Find:
Replace:
This will use Apache to handle 404 errors for the following file types (as determined by extension):
- gif
- jpeg
- shtml and html
- css
- js
- cgi
Notice: Don't add .png files to this list, because system.module uses a phantom .png in system_test(). See http://drupal.org/node/56773 for more details.
Notice: A user comment suggests that this modification will cause a conflict with the CCK imagefield module. See http://drupal.org/node/56773#comment-243479.
