You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pierre Goupil <go...@gmail.com> on 2007/06/27 00:19:22 UTC

browser caching

Hello,

I'm trying to avoid browser caching in my webapp since I've only got dynamic
pages. I'm trying the Apache mod_expires stuff. I've set it to :

ExpiresActive On
ExpiresDefault "now"

But unfortunately, it doesn't work : my HTTP header is set to
"Cache-Control: max-age= 0" actually but the browser (Firefox) still doesn't
want to do another request when I would like it to do so. It's configured to
not use caching (0 MB as cache files size) but it looks like it keeps the
current page in memory.

My (Struts) question is : could this occur because I'm using an
org.apache.struts.actions.ForwardAction forwarding ? Is there a way to avoid
this annoying caching ? I've tried it in as much browsers as I could, but no
way.

LiveHTTPHeaders does show me that after the first request, when I come back
to my page thanks to forwarding, the browser doesn't make another request.
Is this normal behaviour, as far as Struts' forwarding is concerned ?

I'm using : Apache 2.2, Struts 1.3 & Tomcat 5.5

Cheers,


Pierre


-- 
"Mon horizon était désormais les pétales courbés,
Ma nouvelle demeure resplendissait de flèches d'herbes folles
Et d'oreillers de pollens odorants."

(Naïmah, le philosophe Fémereif)

Re: browser caching

Posted by Laurie Harper <la...@holoweb.net>.
mfnospam wrote:
> not sure whether this works - I'm new to s2 myself.
> However there seems to be a possibility to configure brwoser caching in 
> struts.properties:
> struts.serve.static.browserCache=false
> maybe this helps
> 
> kind regards
> matthias

I believe the OP is using Struts 1, though. The equivalent config option 
in S1 is in struts-config.xml, setting the 'nocache' attribute to true. 
 From the DTD documentation:

      nocache         Set to "true" if you want the controller to add HTTP
                      headers for defeating caching to every response from
                      this module.  [false]

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: browser caching

Posted by mfnospam <mf...@gmx.de>.
not sure whether this works - I'm new to s2 myself.
However there seems to be a possibility to configure brwoser caching in 
struts.properties:
struts.serve.static.browserCache=false
maybe this helps

kind regards
matthias

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org