O'Reilly logo

Drupal 7 Theming Cookbook by Karthik Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Enabling CSS optimization

CSS optimization in Drupal is accomplished through two steps, aggregation and compression. In other words, multiple related CSS files are grouped together into a single file and then compressed to produce a much smaller file. This optimization provides a significant boost to performance both on the server as well as for the user.

This recipe demonstrates how to enable this feature in Drupal and explains how it works.

Getting ready

CSS optimization is a requirement only when a site is ready to go live. Until such time, it is recommended that it be left switched off as otherwise, CSS changes during development will not take effect unless the Drupal cache is cleared.

How to do it...

Optimization and other performance related ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required