[Seaside] Static resources location
Avi Bryant
avi at beta4.com
Fri Oct 29 18:16:19 CEST 2004
On Oct 29, 2004, at 6:10 PM, C. David Shaffer wrote:
> You have three options (maybe more...I'm sure someone will suggest
> some else):
>
> 1) have Seaside read the serve the image, in the case of static
> resources a bad idea
> 2) have Kom serve the image, a little better than the previous but
> makes your server sluggish for large images
> 3) have another web server around serving your static images
>
> I use 3 since I've always got Apache running somewhere:
>
> background-image: url("' self class staticImageBase ,
> '/background.png");
>
> where self class staticImageBase answers an absolute URL like
> 'http://www.cdshaffer.com/someapp/images'
An interesting trick that I was considering implementing for this is to
set the Content-Location header of any CSS files to point to a
configurable static base URL - this will then (I think) get used by the
web browser when evaluating relative URLs within the stylesheet, and so
you could keep your CSS clean of any interpolation like the above.
Can anyone think of a reason why this would be a bad idea?
Avi
More information about the Seaside
mailing list