wood burning stoves 2.0*
The moose likes Servlets and the fly likes Is it possible to clear history/ temp files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Is it possible to clear history/ temp files " Watch "Is it possible to clear history/ temp files " New topic
Author

Is it possible to clear history/ temp files

Anil Verghese
Ranch Hand

Joined: Oct 11, 2006
Posts: 155
Hi,

Is it possible to clear the temporary files and the history/cookies , if yes how
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

No, not from the server.
The best you can do is suggest that the browser not cache your pages.
See: http://faq.javaranch.com/java/NoCacheHeaders

As for cookies.
See the API to see how to set the expiration date and to add/remove values:
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/Cookie.html


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Not really, but when you send resources to the client, you can provide cache control settings in the header encouraging them to cache or not cache that resource.

This is not the same as clearing their cache, since you need to tell the client your cache settings at the time you send the resource, not some time afterwards.
 
 
subject: Is it possible to clear history/ temp files
 
Similar Threads
OO design question?
Cleaning out old versions in git
WA #1.....word association
Applet not refreshing
how to delete browser's history from jsp