Web Servers General Talk - Is this a valid use of ETAG?

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers General Talk > March 2005 > Is this a valid use of ETAG?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Is this a valid use of ETAG?
Adam

2005-03-30, 7:23 pm

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
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com