...

View Full Version : Have you seen a value passed to a css file?



boodaah
07-15-2011, 09:12 PM
I'm working with a client's website and I notice that the link to the css file is written as if a value is being passed to it.


<link href="css/root.css?rev=2" rel="stylesheet" type="text/css" />

The ?rev=2 part looks like most normal html post variables, but this is a CSS file. I've never seen anything like it. I've never heard anything like it. I don't really think it does anything.

Does anyone have any thoughts on why the original developer might have done it?

Apostropartheid
07-15-2011, 10:40 PM
I'm working with a client's website and I notice that the link to the css file is written as if a value is being passed to it.


<link href="css/root.css?rev=2" rel="stylesheet" type="text/css" />

The ?rev=2 part looks like most normal html post variables, but this is a CSS file. I've never seen anything like it. I've never heard anything like it. I don't really think it does anything.

Does anyone have any thoughts on why the original developer might have done it?

Any file extension can be parsed as though it were any other. For example, in this case, the CSS file might be written in PHP to output a different set of rules depending on the rev variable.

abduraooft
07-16-2011, 09:10 AM
Does anyone have any thoughts on why the original developer might have done it?
I use it whenever I need to clear the cached CSS files from end users' systems.
Say, /css/style.css?16-july



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum