[prev in list] [next in list] [prev in thread] [next in thread]
List: tomcat-user
Subject: Re: HTTP cache control?
From: Konstantin Kolinko <knst.kolinko () gmail ! com>
Date: 2013-11-25 22:21:29
Message-ID: CABzHfVnA_aA4w_rdOO7OsGYe0s1RnOHHdi-iwWqZsZmmJp1k0g () mail ! gmail ! com
[Download RAW message or body]
2013/11/25 Christopher Schultz <chris@christopherschultz.net>:
> On 11/25/13, 10:27 AM, David Bala=C5=BEic wrote:
>> Hi!
>>
>> Considering that JSP pages are by definition dynamic (different on
>> each GET), why doesn't Tomcat set the HTTP headers in the line of
>> "do not cache this, it's dynamic!" by default for all generated
>> HTML (*.jsp files and servlet responses)?
>
> What about JSPs that produce (relatively) static stuff? Would you want
> Tomcat to tell the client to re-fetch that data every time? (Then we'd
> get questions about why Tomcat was doing that, of course.)
>
+1
Even if content is dynamic, there might be different caching
strategies. The caching interval may be different, such as several
minutes, 1 hour, 1 day or several months.
Tomcat sets headers that prevent caching for the content that is
protected by security constraints. The rest is up to you.
> It's trivial for you to add such headers yourself, and this is a
> decision best made by application authors and not the container. So,
> go ahead and exercise your right to determine how your own web
> application behaves and set those headers yourself. Don't want to edit
> all your JSPs? How about slapping a Filter in front of them instead?
>
http://tomcat.apache.org/tomcat-7.0-doc/config/filter.html#Expires_Filter
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic