Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

All URLs for Javascript files and CSS files included from theme / module directories are appended with query strings like ?H or ?0. However compressed CSS file does not have that query string appended.

Have tried turning off Boost and core caching (from admin/settings/performance), turning off Clean URLs but not helping.

I'm running drupal 6.22 on Apache 2.2.14 on Linux.

What could be the problem?

Thanks!

share|improve this question
    
Are you just curious as to what is causing it? or is causing a particular problem that you want to work around? The query string is there to control the web browser cache. If Drupal detects a change in the js or css file, it alters the query string, effectively forcing a refresh –  Nick Downton Aug 31 '11 at 11:27
    
@Nick Downton Thanks for the info. I wasn't aware of this but by running the page speed test from Google pagespeed.googlelabs.com it complains that this may result in some proxies fail to cache these elements. I noticed that the drupal.org site doesn't have these query strings. –  Ryan Aug 31 '11 at 13:50
    
on drupal.org they have css and js aggregation turned on. (not sure if this is a new drupal 7 feature) This basically adds all the individual files together. The filename for this is js_ or css_ and then an md5 of (I presume) the contents of the the combined css or js. So if any css or js changes, the filename will also change, causing the browser to reload the file. Because it isn't requesting a static resource on the server, there is no need to use the query string to control caching. –  Nick Downton Aug 31 '11 at 15:39
    
Yes I just figured that the combined (optimized) CSS from my site doesn't have that query part too. This optimization is available in drupal 6 already. Thanks for helping out! –  Ryan Aug 31 '11 at 16:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.