Even though Drupal (since long ago) supports merging CSS and JS into one file each, after I upgraded from v6 to v7, I still ended up getting more than one of each. It turns out, Drupal has some notion of groups, and it would only merge the CSS / JS elements within each group. I did some web searches, and came up with the following:
This goes into the Theme's template.php file, in my case I use the Pixture Reloaded theme. I don't know much about Drupal nor PHP, so I don't know what this might break. But this accomplishes three things:
- Merge all CSS into one single CSS.
- Merge all JS into one single JS.
- Move the JS to the "footer" of the page (this is important for improved page rendering, but could potentially break some sites I'd imagine).