Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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?

  • #2
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    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.

  • #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,854
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    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
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •