Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Jul 2011
    Posts
    2
    Member #
    28550
    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.

    HTML 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.  

  3. #2
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    Possibly they actually pulling the contents of the css file from a db and the var is part of the query...

    if you're in control of the server... you can specify any file to call the asp engine... in which case the browser is actually only going to read the "output" of the query.

    if this is somewhere on a shared server... then it's probably a programming bluff... to make someone think you're doing something different as the typical CSS mapi extenstion calls the "text" engine... with no processing from the server.

  4. #3
    Junior Member
    Join Date
    Jul 2011
    Posts
    2
    Member #
    28550
    I didn't think of that.

    This server is a typical dedicated LAMP server, but you made me realize that this code was probably deployed on other various servers, and this might be legacy code from those configurations.

    Thanks, it would have drove me nuts until I figured it out.

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    Another possibility is that there's a custom 404 at work here.

    Custom 404 sees missing CSS file.
    Sees rev=2.
    Queries database.
    Retrieves CSS file.
    Outputs CSS file.

    I haven't done this with CSS before, but I have done it with images that were generated on the fly.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:24 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com