Monday, September 3, 2007

[completeJava] problem with client side page caching.

Hi All,
 
I am unable to restrict the browser from not to caching my webpage at the client side. I am getting this problem only when i use tiles with struts. in case regular jsp files it is working fine.  I am using the following code in my jsp files to restrict client side caching.
 
<
meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma-directive" content="no-cache" />
<meta http-equiv="Cache-Directive" content="no-cache" />
 
I also tried with the other way
 
<%
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader(
"Pragma","no-cache"); //HTTP 1.0
response.setDateHeader (
"Expires", 0); //prevents caching at the proxy server
%>
 
Both these code snippets are working incase of a simple jsp file. But in case of Struts tiles , it the meta tags are not even visible in the client side generated web page. 
 
Can anybody triggerout that where might be I am making mistake ?
 
Thanks in Advance :)
 
Santhosh.


Santhosh.G
me@santhoshgandhe.com


Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool.

__._,_.___
Recent Activity
Visit Your Group
Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

Ads on Yahoo!

Learn more now.

Reach customers

searching for you.

Food Lovers

Real Food Group

on Yahoo! Groups

find out more.

.

__,_._,___

No comments: