Looking at my generated source code for pages what are the ?5 at the end of each stylesheet link?
<link type="text/css" rel="stylesheet" media="all" href="/drupal/modules/node/node.css?5" /> <link type="text/css" rel="stylesheet" media="all" href="/drupal/modules/system/defaults.css?5" />
I'm just curious thats all as I have never seen a decleration of a stylesheet like that before!
Hi Martin The parameter that Drupal passes to the stylesheet link (?5 in your example) is to manage your browser cache.
A browser cache works as follows: - If it request a resource located in A, it looks if it's in its cache. If it isn't located, the request is launched. When the response (R) arrives, the browser creates an entry in its cache like A -> R to use it in other request.
In this case, Drupal passes a parameter to the stylesheet, js and other static resources to manage the browser cache, and its refresh rate. If you look, the URL (the parameter) changes when we changes our css or js files:
Before the change:
<link type="text/css" rel="stylesheet" media="all" href="/drupal/modules/node/node.css?5" />
After that:
<link type="text/css" rel="stylesheet" media="all" href="/drupal/modules/node/node.css?6" />
(?6 is a example)
So now your browser clear the cache and performs the request to locate the new file.
Do you understand that? (my english needs a big improvement...)
Ramon
2009/9/15 Martin Hooper martin.hooper@gmail.com:
Looking at my generated source code for pages what are the ?5 at the end of each stylesheet link?
<link type="text/css" rel="stylesheet" media="all" href="/drupal/modules/node/node.css?5" /> <link type="text/css" rel="stylesheet" media="all" href="/drupal/modules/system/defaults.css?5" />
I'm just curious thats all as I have never seen a decleration of a stylesheet like that before! -- [ Drupal support list | http://lists.drupal.org/ ]
2009/9/15 Ramon Vilar Gavaldà ramon.vilar@gmail.com:
Do you understand that? (my english needs a big improvement...)
No I do understand that thanks - I wouldn't have guessed that English is not your first language :)