I know many things are cooking right now and this might not be a high ranking priority, but I thought I’d ask anyway... I have been
investigating the problem with using CSS as document with IE, to finally enjoy the benefits of CSS MODx documents instead of classic CSS files... much easier to chunk down your css and use modular design, plus the benefits of using [(site_url)] for image path.
Anyway, the root of the problem is (again) an IE bug, which has been documented on Expression Engine Knowledge blog :
While Internet Explorer does support gzip compression, it has a bug that leads to a problem if the compressed file is smaller than 4k in size; something that can often happen.
I don’t know about you, but most of my css files are around 8-12kb, I imagine some could get below the 4kb treshold after compression and cause trouble like it does for me.
Of course, turning off gzip is not a nice option, since it can save bandwith... unless you can selectively turn off gzip only for CSS. I had found a way to selectively turn off compression for .css files via httpd.conf :
<IfModule mod_gzip.c>
(...)
mod_gzip_item_exclude file " \.css$ "
(...)
</IfModule>
But the problem is, CSS documents get the same default suffix as any document (more often than not, .html). And anyway, not everyone will have access to Apache’s configuration files. I looked at .htaccess but only found the
mod_gzip_on Off directive which turns compression for all content...
Having different suffix for different content types in MODx document would be ideal, but I don’t know how hard it would be to implement.
Can this issue be solved ?
It’s too bad not being able to enjoy the benefits of CSS MODx documents
Of course I could call it a day and just put a conditionnal CSS for IE and benefit from dynamic stylesheets with other browser, but that’s not satisfying... don’t you think ?
Plus it would be a great thing to advertise the unique dynamic stylesheet capabilities of MODx !