AblSysadmin
asked on
Clear Cache on JSP WEB PAGE
Hi
I new to jsp and java but I need to know is there a way to my sure that when the user logout from the application that it clears the cache from the browser (FIREFox and IE). If there a script of meta tag to use that works 100%.
Also that values does not cache in my application. E.g. I have a link called Search Asset and i requires me to input a value e.g (NG123) and get my results. Now when I go to a second link called Transfer Asset and it populate the value automaticlly (NG123). Is there a way on my jsp page to clear cache on every page
I new to jsp and java but I need to know is there a way to my sure that when the user logout from the application that it clears the cache from the browser (FIREFox and IE). If there a script of meta tag to use that works 100%.
Also that values does not cache in my application. E.g. I have a link called Search Asset and i requires me to input a value e.g (NG123) and get my results. Now when I go to a second link called Transfer Asset and it populate the value automaticlly (NG123). Is there a way on my jsp page to clear cache on every page
ASKER
Hi Expert
I am still new to java and do not know much about c#. Could you assit with javascript or java.
I am still new to java and do not know much about c#. Could you assit with javascript or java.
This may help: http://docs.sun.com/app/docs/doc/819-5023/6n74rg4gg?a=view
ASKER
Hi
I will have a look at it and provide you with feedback
I will have a look at it and provide you with feedback
ASKER
Hi
I have placed tis in my LoginForm.jsp but when I log out and I want to log in back again I can still see that my username is cached
I have placed tis in my LoginForm.jsp but when I log out and I want to log in back again I can still see that my username is cached
<%
//This is to disable caching
//There has to be a better way to do this
//See http://www.jguru.com/faq/view.jsp?EID=377&page=2 for details
response.setDateHeader("Expires", 0); //prevents caching at the proxy server
response.setHeader("Cache-Control", "private, no-store, no-cache,must-revalidate, max-stale=0"); //HTTP 1.1
response.addHeader("Cache-Control", "post-check=0, pre-check=0"); //IE Specific
response.setHeader("Pragma","no-cache"); //HTTP 1.0
%>
<%
response.setHeader( "Pragma", "no-cache" );
response.setHeader( "Cache-Control", "no-cache" );
response.setDateHeader( "Expires", 0 );
%>
ASKER
Hi
I have placed the following below in my logout page and it cleans my cookies, but my probem is that when loggin into the application the value cache still happend. What I tried yesterday changing my bean from session to request and it give me error and I had to change it back. Is there some assistance to this please
<% request.getSession().inval idate(); %>
I have placed the following below in my logout page and it cleans my cookies, but my probem is that when loggin into the application the value cache still happend. What I tried yesterday changing my bean from session to request and it give me error and I had to change it back. Is there some assistance to this please
<% request.getSession().inval
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Excellent
Open in new window