Issue #3019393 by hugovk, PapaGrande: Avoid query strings for aggregated CSS files (like JS)
parent
97eb1ad748
commit
7cbb0ca739
|
@ -55,10 +55,13 @@ class CssCollectionRenderer implements AssetCollectionRendererInterface {
|
|||
switch ($css_asset['type']) {
|
||||
// For file items, output a LINK tag for file CSS assets.
|
||||
case 'file':
|
||||
// The dummy query string needs to be added to the URL to control
|
||||
// browser-caching.
|
||||
$query_string_separator = (strpos($css_asset['data'], '?') !== FALSE) ? '&' : '?';
|
||||
$element['#attributes']['href'] = file_url_transform_relative(file_create_url($css_asset['data'])) . $query_string_separator . $query_string;
|
||||
$element['#attributes']['href'] = file_url_transform_relative(file_create_url($css_asset['data']));
|
||||
// Only add the cache-busting query string if this isn't an aggregate
|
||||
// file.
|
||||
if (!isset($css_asset['preprocessed'])) {
|
||||
$query_string_separator = (strpos($css_asset['data'], '?') !== FALSE) ? '&' : '?';
|
||||
$element['#attributes']['href'] .= $query_string_separator . $query_string;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'external':
|
||||
|
|
Loading…
Reference in New Issue