Previous Message
Next Message

CSS within Server Side Includes

Sent by John Horner on 28 September 2004 00:12


The discussion of this topic inspired me to mention a technique I've 
used in the past:

  * put a Server-Side Include into the HEAD of your document
  * put a <LINK> tag inside it.

I know that sounds insane, but hear me out. This way you can be 
absolutely sure that your style sheet is not cached.

Say in the top of every document you have:

      <!--#include virtual="/includes/linktag.txt">

and in "/includes/linktag.txt" you have one line:

      <link rel="stylesheet" href="/path/to/file.css">

and then you find out that "/path/to/file.css" is causing huge 
problems with one or other browser. You fix the CSS, Save As, and 
change the link tag in the include to:

       <link rel="stylesheet" href="/path/to/newfile.css">

and the next time someone sees your page, they get the fixed style sheet.

jh
------------------------------------------------------------
                "Have You Validated Your Code?"
John Horner                            (+612 / 02) 9333 2110
Senior Developer, ABC Online          http://www.abc.net.au/
------------------------------------------------------------

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: