Forums Register Login
Cearing browser Cache using Servlet
Hi ,

I would like to clear the cache memory of the browser using servlet by which it will not allow the visitor to access the previous page(The User Account Area Page) after logout.
I tried it using the following block of code, but unfortunately its not working. I mean only logout is working properly...

Please help me out.

//Here is the code
HttpSession session=request.getSession(false);

//request.getRequestDispatcher("SuccessfulLogout.jsp").forward(request, response);

Thanking you in advance...

Amitav Anand
You can't cause the browser cache to clear. You can suggest to the browser that it not cache your page, as you are doing, but that's the extent of what you can do.
Thanks for your immediate response.
I think you are right as far as the browser cache memory is concerned.

In fact I have written the code that is supposed to prevent the server output from getting stored in the browser cache.

But its not even doing that....

Please guide me if anything wrong out there in the code or the steps for the same.

Thanks and Regards.

Amitav Anand
You don't like waffles? Well, do you like this tiny ad?
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database

This thread has been viewed 4658 times.

All times above are in ranch (not your local) time.
The current ranch time is
Mar 18, 2019 15:26:06.