Tuesday, September 4, 2007

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

Anil,
 
These lines are working in case of a regular jsp file. but When my page was build from a tile deffination, then it is not working at all.  I thogut we need to do something else in case of tiles frame work. Because it is always caching the webpage tiles at the client side.
 
Santhosh.

anil <anilkumark@huawei.com> wrote:
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.



Santhosh.G
me@santhoshgandhe.com


Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out.

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

It's Now Personal

Guides, news,

advice & more.

New business?

Get new customers.

List your web site

in Yahoo! Search.

Yahoo! Groups

Endurance Zone

A Yahoo! Group

for better endurance.

.

__,_._,___

No comments: