|
| Hi,
I have a rather unusual question. I have a web application where I
generate CSS from Java (its a JSP but who cares). In my design, I have
two sub trees (lets say /Foo and /Bar). Every page within /Foo uses
one set of colors, everything within /Bar uses a different set of
colors.
Here's my thought. I would like to always use /style.jsp as the path
to my CSS, regardless of the section and I don't want to use a query
string.
I can look at the referrer to decide which color set to use, but
caching is an issue. I'd rather not have to send the CSS each time.
Can I send a different ETAG for each colorset and then rely on the
IF-NONE-MATCH message? Obviously I'm counting on:
A) Browsers keeping multiple cached files on hand depending on ETAG
B) That having multiple ETAG files will trump Expiry info for caching
Is this even a good idea? Can you mix Expiry and ETag based caching (I
suppose not).
What do you guys think? Perhaps this isn't a very good idea, I just
want some suggestions. I can think of a dozen other ways to approach
the issue but this one seems more... elegant somehow.
Thanks,
Adam
|
|