Monday, September 3, 2007

RE: [completeJava] problem with client side page caching.

Hi santhosh,

 

Try for this code,

 

<% 
response.setHeader("pragma","no-cache");//HTTP 1.1 
response.setHeader("Cache-Control","no-cache"); 
response.setHeader("Cache-Control","no-store"); 
response.addDateHeader("Expires", -1); 
response.setDateHeader("max-age", 0); 
//response.setIntHeader ("Expires", -1); //prevents caching at the proxy server 
response.addHeader("cache-Control", "private"); 

%>

 

K. Anil Kumar

Huawei Technologies India Pvt. Ltd.
Mailid: anilkumark@huawei.com

Mobile: 09980644933

********************************************************************************************************
 This e-mail and attachments contain confidential information from HUAWEI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient's) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!


From: completeJava@yahoogroups.com [mailto:completeJava@yahoogroups.com] On Behalf Of SANTHOSH GANDHE
Sent: Monday, September 03, 2007 9:26 PM
To: completeJava@yahoogroups.com
Subject: [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="Cach! e-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
Give Back

Yahoo! for Good

Get inspired

by a good cause.

Y! Toolbar

Get it Free!

easy 1-click access

to your groups.

Yahoo! Groups

Start a group

in 3 easy steps.

Connect with others.

.

__,_._,___

No comments: