Hey, I have been optimizing my site when I noticed that my global aggregated CSS files get different hash if I add any local css through use of drupal_add_css('stylesheet_path.css', 'theme', 'all', FALSE), on that particular page. Causing my global CSS to be re-downloaded again, even though its contents have not changed.

By poking around, I found that function drupal_get_css() in 'misc/common.inc', generates a new md5 hash based of added css files, but it doesn't exclude any css files with 'preprocess' parameter set to FALSE. In which case it is generating new hash for css already aggregated, even though it is not necessary.

Is there any chance of getting a patch for that in next drupal 6.x core update, or should I just fork my common.inc file? Thanks.

Comments

antkiewicz’s picture

Just to clarify, when I say that my CSS get re-downloaded, I mean that my browser is unable to use cached CSS file and grabs a new one, even though it has the the same contents as other one because of the new md5 hash in its file name.

wim leers’s picture

Status: Active » Closed (won't fix)

This is not a bug in D7/D8, and after this having been around for many years I doubt it will be fixed in D6 now. Sorry.