Hello! After days of browsing the forums, I finally post this question (totally out of my area of expertise):

I have done a couple of Drupal installs in other servers successfully, but in Fatcow (http://www.fatcow.com), after activating "Aggregate and compress CSS files" in the performance section, it works in every browser except IE! not even IE9 gets the CSS files correctly.

After trying to access a CSS file in IE directly trough it's absolute URL, i get the following: "???·$%/&???&/(???ªªº??º-º (... a whole load of it)" it's just trash... is it still compressed?

The response headers in IE for a css file (compression: ON) look like this:

Response: HTTP/1.1 200 OK
Date: Sat, 18 Feb 2012 14:44:38 GMT
Content-Type: text/css
Connection: keep-alive
Server: Nginx / Varnish
Last-Modified: Sat, 28 Jan 2012 19:55:22 GMT
ETag: "8ac-4b79bfe5a7e80"
Accept-Ranges: bytes
Content-Length: 2220
Cache-Control: max-age=14400, public
Expires: Sat, 18 Feb 2012 18:44:38 GMT
Content-Encoding : x-gzip

Without compression activated, everything works as expected.

Maybe fatcow isn't sending the headers the right way? maybe .htaccess related? config.php related? php.ini related (I can edit php.ini in fatcow)? I don't really know what to do to make this work in IE...

Comments

john_b’s picture

Is the nginx server compressing the files? Look at headers with compression off. If so, there is probably no need to turn on Drupal compression. http://groups.drupal.org/node/128559

For an easy life, ask fatcow to provide you with an Apache webserver instead of nginx. Their homepage uses Apache.

Interesting that they are offering nignx/varnish. I was not aware any shared host was doing that.

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors

danyalejandro’s picture

So, in settings.php there's a part that says:

* By default, when CSS or JS aggregation and clean URLs are enabled Drupal will
* store a gzip compressed (.gz) copy of the aggregated files. If this file is
* available then rewrite rules in the default .htaccess file will serve these
* files to browsers that accept gzip encoded content. This allows pages to load
* faster for these users and has minimal impact on server load. If you are
* using a webserver other than Apache httpd, or a caching reverse proxy that is
* configured to cache and compress these files itself you may want to uncomment
* one or both of the below lines, which will prevent gzip files being stored.
*/
# $conf['css_gzip_compression'] = FALSE;
# $conf['js_gzip_compression'] = FALSE;

I found said files in files/css and files/js, where both copies are kept: normal aggregated css ones and gzipped ones. I dare to say Fatcow sends everything gzipped, and when IE requests the gzipped version (as it supports gz compression) it's sent double-compressed.

After deleting the contents of this folder, uncommenting both lines in configuration.php (had to temporary change permissions), and clearing cache, I can use aggregation / compression successfully in IE.