Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Highlighted
New Member
Posts: 1
Registered: ‎05-05-2010
My Device: Blackberry 9550
My Carrier: Rogers

Unwanted Caching or escape key behavior

Hello Everybody,

 

I am developing on a web site that has a login section which contain sensitive data.

Once the users logged out, he will end up on the log out page. Using blackberry's back or

escape button allows him to go all the way back even though he is not logged in any longer.

I know this problem is related to blackberry's native browser, the way it caches websites and also

the way blackberry's escape button is being implemented.

 

I already try the following and none of it works:

 

Meta tag as suggested by RIM,

<meta http-equiv="EXPIRES" content="NOW">

<meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate, post-check=0, pre-check=0" >

<meta http-equiv="Pragma" content="no-cache" >  

 

Also tried meta tags in uppercase and lowercase http response headers: response.setHeader("Cache-Control", "no-cache");

response.addHeader("Cache-Control", "no-store");

response.addHeader("Cache-Control", "max-age=0");

response.addHeader("Cache-Control", "must-revalidate");

response.setHeader("Pragma", "no-cache");

long currentTime = System.currentTimeMillis();

response.setDateHeader ("Expires", 0);

response.setDateHeader ("Date", currentTime);

response.setContentType ("text/html");

 

for content type, tried both text/html and application/xhtml+xml

 

Redirects/Forward: Meta redirect: <meta http-equiv="refresh" content="5; url= Javascript redirect: window.location.replace( sURL ); Response header redirect: response.setStatus(response.SC_MOVED_TEMPORARILY); response.setHeader("Location", "redirect_302_3.jsp"); javascript&colon;window.history.forward  

 

Cookies: Check current cookie: if (myCookie==null || !myCookie.getValue().toString().equals("yes")) response.sendRedirect("index.html"); In an embedded image, also check current cookie. <img src="checkCookie.jsp" alt="check cookie">

 

At last I was trying to find out a way to disable the escape button using javascript.

I just couldn't find a way.

 

Any ideas from the RIM specialists.

 

What I would like to achieve is a redirect back to the sign on page rather than back to the stall user session.

 

Thanks in advance

 

hhoosscchhii