szym Posted September 8, 2011 Share Posted September 8, 2011 Hi, CCC is great feature but theres a bug in it. When you modify a css file combine file gets rebuild but its name (hash) dosen't change so with default htaccess settings server sends 301 to any user that has file with that old name and in the end user gets old css rules not the new file. To fix this I added file modification time for each css file to the string hashed for combined filename. Like this (Tools.php near line 1515) $infos['time'] = filemtime($infos['path']); $css_files_by_media[$media]['date'] = max( file_exists($infos['path']) ? $infos['time'] : 0, $css_files_by_media[$media]['date'] ); if (!array_key_exists($media, $compressed_css_files_infos)) $compressed_css_files_infos[$media] = array('key' => ''); $compressed_css_files_infos[$media]['key'] .= $filename.$infos['time']; 2 Link to comment Share on other sites More sharing options...
Carl Favre Posted September 8, 2011 Share Posted September 8, 2011 Hi szym, It is not a bug. You just have to clear your browser cache and this way you can see the changes. Link to comment Share on other sites More sharing options...
mozack Posted October 18, 2011 Share Posted October 18, 2011 Hi, Thanks for the MOD, it works great. Responding to Carl Favre, it is not just clear cache because if you use services like CDN, it is just updated when the file name changes... Thanks SZYM Link to comment Share on other sites More sharing options...
buhajus Posted November 20, 2013 Share Posted November 20, 2013 Hi szym, It is not a bug. You just have to clear your browser cache and this way you can see the changes. Simple user dont know this ! Link to comment Share on other sites More sharing options...
Recommended Posts