Screenshot of IE CSS Optimizer form

Internet Explorer will refuse to load more than 31 linked stylesheets. Unfortunately, the alternative to load styles using @import statements (which Drupal 5 used), has bad performance implications.

The fix for this on production sites is to simply enable the “Optimize CSS files” option on admin/settings/performance. Unfortunately, that option makes developing CSS for themes or modules a true PITA. This module adds a developer-friendly solution to the “Optimize CSS files” feature; it aggregates all stylesheets except for those in the theme or in the selected module.

Private Download Method

Note that Drupal’s CSS optimization (and this module) doesn’t work when files are transferred using Drupal 6’s private download method. See #572516: make private download method support css/js aggregation, color module and js translations This incompatibility is fixed in Drupal 7.

Drupal 7 version

At this time, it appears this module is not needed for Drupal 7. See #228818: IE: Stylesheets ignored after 31 link/style tags

Comparison with IE Unlimited CSS Loader

IE Unlimited CSS Loader:

IE CSS Optimizer:

  • Optimizes all CSS files except for the module or theme being actively developed.
  • To prevent a theme's numerous stylesheets from hitting IE's 31 stylesheet limit (common with RTL websites), the 31st and later stylesheets will be loaded with @import statements.
  • If the theme stylesheets do not reach the 31 stylesheet limit, the stylesheets will continue to be loaded with the standard <link /> method which is more compatible with javascript development. (using @import causes stylesheets to load in a different order on some browsers.)

Project Information

Downloads