<link type="text/css" rel="stylesheet" href="..." media="all">

Turns into

<link type="text/css" rel="stylesheet" href="..." media="all and (min-width: 720px)">

This is a horrible idea! It sounds like this module is breaking core's aggregation by forcing those stylesheets to not be aggregated with the CSS using media="all". And browsers download all stylesheets whether or not the media query in the <link> applies. So there's a performance hit of adding extra HTTP requests.

I must be missing something, right?

Comments

johnalbin’s picture

BTW, I think you could work around these issues (maybe you already have and the project homepage is out-of-date). But I think many will avoid this module after realizing the performance implications from reading the project homepage.

johnalbin’s picture

Title: Wait… what? » Discuss performance implications of using media queries in HTML source

Less snarky title. Sorry about that. :-)

rupl’s picture

Status: Active » Closed (works as designed)

Upon testing the module you will see that it either causes no change in the number of aggregates, or in some cases reduces them.

When every "all" media query is changed homogeneously within the system, it collapses back into the original groups as if they were never altered (since they're all the same media again). A 1-minute inspection of the module's behavior would have confirmed this (install, turn on aggregation, view source).

There are some changes requested in other issues which would indeed cause massive perf implications, and for that reason I have not yet pushed them into the dev branch.

johnalbin’s picture

A 1-minute inspection of the module's behavior would have confirmed this (install, turn on aggregation, view source).

Sorry about that, Chris. I was doing a 1-minute inspection of the project homepage.

I see my mistake. I evaluated the technique correctly, but didn't understand the purpose of the module. I thought the module provided a way to pick which stylesheets you want to wrap with a media query. But the module actually wraps ALL module stylesheets.

My apologies!