3

I am using rewrite_css config and found a problem. Conditional CSS files inside HTML comments are ignored by mod_pagespeed.

    <!--[if (IE 7) | (IE 8)]>
        <link href="mycss.css" rel="stylesheet"/>
    <![endif]-->

However, this style does work:

    <!--[if (IE 7) | (IE 8)]><!-->
        <link href="mycss.css" rel="stylesheet"/>
    <!--<![endif]-->

The first of the two is ignored by browsers, which do not support conditional comments. The second isn't. Bottom line: there are subtle differences between the two: http://msdn.microsoft.com/en-us/library/ms537512(v=vs.85).aspx#dlhidden

So I don't want to change how the page is set up as it can have negative consequences. Ideally, I'd like to coax mod_pagespeed into rewriting the css inside the comment. Are there any ways to make that happen?

4

1 回答 1

1

目前不支持此功能。mod_pagespeed 只重写评论中没有的东西。

不过,有两个开放的功能请求: https ://code.google.com/p/modpagespeed/issues/detail?id=553 https://code.google.com/p/modpagespeed/issues/detail?id =288

于 2013-09-05T19:23:32.880 回答