I really don't know what this is and it doesn't seem to really effect anything, but I thought I should report it and ask if anyone does know what it is.

While working on creating a Zen sub-theme I discovered that every .css and .js added to header was actually written as .css?9 and .js?9

It didn't seem to effect anything, but I can't track down where it was coming from.

So I switched back to the Garland Theme, turned of all contributed modules and all optional core modules, cleared the cache (but note I have all cacheing disabled under site performance anyways), and then looked at the source of the page.

Now every .css and .js file has "?I" appended to it. Here is the entire section

 <head>
    <title>Themes | Some Girls boutique</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="/misc/favicon.ico" type="image/x-icon" />
    <link type="text/css" rel="stylesheet" media="all" href="/modules/node/node.css?I" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/system/admin.css?I" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/system/defaults.css?I" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/system/system.css?I" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/system/system-menus.css?I" />
<link type="text/css" rel="stylesheet" media="all" href="/modules/user/user.css?I" />

<link type="text/css" rel="stylesheet" media="all" href="/themes/garland/style.css?I" />
<link type="text/css" rel="stylesheet" media="print" href="/themes/garland/print.css?I" />
    <script type="text/javascript" src="/misc/jquery.js?I"></script>
<script type="text/javascript" src="/misc/drupal.js?I"></script>
<script type="text/javascript" src="/misc/tableheader.js?I"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, { "basePath": "/" });
//--><!]]>
</script>
    <!--[if lt IE 7]>
      <link type="text/css" rel="stylesheet" media="all" href="/themes/garland/fix-ie.css" />    <![endif]-->
  </head>

So before cache clear, all these added .css and .js files had ?9 appended to them, and now they have ?I. Interestingly, when I was working on my own theme, even the ie.css file was written as ie.css?9. But now with everything turned off, that is the only file not having the "?I" appended.

This is a new installation of Drupal 6. Started with clean install of Drupal 6.6 just a few days ago, upgraded to Drupal 6.7 and then 6.8. I don't know if this was there before or not, but I never saw this in my Drupal 5 work.

I apologize if this is something "generally known" or if I'm asking about this in the wrong place, but I can't find anything by searching because all searches ignore the "?".

Thanks

BTW, I'm running Drupal on my local machine (Mac OSX 10.5) with MAMP PRO, PHP 5.2.6, MySQL 5.0.41

Comments

dave reid’s picture

Status: Active » Closed (works as designed)

It's to prevent browsers from caching those files when they change.

berenddeboer’s picture

And what about the people who want to cache these files? We can perfectly well set the caching on these things in .htaccess. What happens now is that these files have become uncacheable and require a round-trip, increasing load on server.

Drupal shouldn't do such caching, can we please handle that ourselves? We're perfectly capable of doing so, thank you.

damien tournoud’s picture

And what about the people who want to cache these files? We can perfectly well set the caching on these things in .htaccess. What happens now is that these files have become uncacheable and require a round-trip, increasing load on server.

Cache how? Since when a query parameter prevent caching?

Those files should be cached on the client side, without even touching anything in the .htaccess.

mattez’s picture

Version: 6.8 » 6.9
Status: Closed (works as designed) » Active

That string should be longer or completely unique. Now i was solving strange problem, I'm developing new project, reloading all the time so my Firefox had in cache almost all variants of CSS file (IMHO there are only A-Z letters?), so when Drupal use this variable again, Firefox loaded some my old cached CSS file. It was really confusing,...

berenddeboer’s picture

You will depend on client configuration, i.e. random behaviour, see the post of the next guy. Trying to defeat caching is surely not the way to go as this approach tries to do. Leads to weirder and weirder situations where caching still happens or does not happen.

And for query parameters: many caches don't cache URLs with query parameters. The HTTP protocol has defined the headers to use if you don't want caching, and these should be used instead of a poor man's approach to defeat caching or make it work.

lyricnz’s picture

Status: Active » Closed (works as designed)

Works as designed.