Serving CSS from a static domain

Posted by Saif Bechan on Stack Overflow See other posts from Stack Overflow or by Saif Bechan
Published on 2010-03-21T19:15:05Z Indexed on 2010/03/21 19:21 UTC
Read the original article Hit count: 245

Filed under:
|
|

I want to serve my css and images from a static cookieless domain. Now my problem is how to point to the images from within my css files.

I don't want to program my domain hard within the css file, for example:

http://static.com/image.png

I would rather have a variable pointing to the the image, so it works for every static domain i use.

What is the best way for achieving this. Should i run the whole css file trough php and add the static domain in front of all the png references. A downside in this is that i have to place the whole css in html.

Or is there another more optimized way of doing this.

© Stack Overflow or respective owner

Related posts about css

Related posts about cookieless