httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <>
Subject Re: [users@httpd] help with XML refresh and cache control
Date Tue, 24 Jul 2007 16:57:59 GMT
On 7/24/07, Jim Owens <> wrote:
> I'm using Apache on an intranet to serve an XML database. Users can
> modify what they see by selecting radio buttons on an HTML form. The
> form sends off a CGI GET request with different parameters, based on the
> buttons selected -- for example, generic_xsl.rex?product=A&revision=B.
> The script generates a customized XSLT file called "specific.xsl" and
> then sends the XML file with an xsl:stylesheet header invoking specific.xsl.
> On some browsers, successive different requests don't change the
> display. The user has to hit Refresh to see the updated XSLT output.

That would be a significant browser bug if the cache is being used
when a different URL is specified.

> To solve this, I've added to the Apache configuration:
> header Cache-Control no-cache
> This works, but has side effects. Now when the user returns to the HTML
> form, the previously selected buttons are cleared.  Also, of course,
> caching is completely disabled, which doesn't seem like good practice.
> Is there a way I can use no-cache selectively -- say, only when the
> script is invoked, or only when the referring page is the HTML form?
> I'mn aware that Header has an env= option, but I can't figure out how to
> use it here.

The header directive can be scoped inside
<Directory>/<Location>/<Files> sections. So for example,
<Files generic_xsl.rex>
Header set ...

You could also try different cache-control directives like
must-revalidate to see if the effect was better.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message