Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-15-2011, 08:12 PM   PM User | #1
boodaah
New to the CF scene

 
Join Date: Jul 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
boodaah is an unknown quantity at this point
Have you seen a value passed to a css file?

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.

Code:
<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?
boodaah is offline   Reply With Quote
Old 07-15-2011, 09:40 PM   PM User | #2
Apostropartheid
The Apostate


 
Apostropartheid's Avatar
 
Join Date: Oct 2007
Posts: 3,215
Thanks: 16
Thanked 265 Times in 263 Posts
Apostropartheid is on a distinguished road
Quote:
Originally Posted by boodaah View Post
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.

Code:
<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.
__________________
Blog | Twitter
Useful links: W3C HTML Validator | W3C CSS Validator | HTML 5 Guide
CF: HTML & CSS Resources/Tutorials Thread | HTML & CSS Posting Rules and Guidelines
Remember: no link, no code, no help!
Apostropartheid is offline   Reply With Quote
Old 07-16-2011, 08:10 AM   PM User | #3
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,689
Thanks: 158
Thanked 2,184 Times in 2,171 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Quote:
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
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:59 PM.


Advertisement
Log in to turn off these ads.