File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes How to avoid caching from History(Urgent!!!) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "How to avoid caching from History(Urgent!!!)" Watch "How to avoid caching from History(Urgent!!!)" New topic
Author

How to avoid caching from History(Urgent!!!)

Dushyant Bhardwaj
Greenhorn

Joined: Apr 18, 2004
Posts: 28
Dear All,
In my application I have used caching code and
it avoids caching successfully , But I am facing the
problem with IE history.
The pages (specifically) accessed using query string , any pdf report
accessed in application can be seen in IE history.
Is there anyway to avoid this.
Any help would be higly appriciable.
Thanks & Regards,
Dushyant Bhardwaj
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
IE likes to ignore meta tags, look at my last post on the following link:
http://www.coderanch.com/t/113296/HTML-JavaScript/NOT-Cache
Eric
Dushyant Bhardwaj
Greenhorn

Joined: Apr 18, 2004
Posts: 28
Hi Eric,
Thanks for reply but I could not get
what is meaning of
"script only works on 1 page. Will change this in the near future."
Another point is I am generating PDF files in my application
and all the generted pdfs get cached as well as can be
seen in IE history.
If one customer logs into the application and generates some pdf reports
another user can always view the transaction of first.
So my point is
Can we avoid caching of pdf,.rtf .. files .
Early response is appriciable.

Regards
Dushyant Bhardwaj
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
that link was not what I thought it was....
I thought it was another script...
but we will ignore that....
all of the pages will show up in the history on a person's computer. I thought that your problem was that the cached page was not showing the new version...
Anyway, there is no real way to stop things from showing in the history.
If you want to look into JvaScript, you can use document.location.replace('theUrl') and it writes over what ever is the last item in the history.
The best defense would be sessions with a server side langugae..
Eric
Dushyant Bhardwaj
Greenhorn

Joined: Apr 18, 2004
Posts: 28
Dear Eric,
Thanks for your reply.
As you have said "you can use document.location.replace('theUrl')" .
Can you explain , how exactly to use this.
I think this can only prevent the urls which are opened directly with
query string , what about those which are opened with
window.open().
My big concern is how to prevent user to see from history what all pdf
have been generated by other users.
Waiting for an early response on this.
Regards
Dushyant Bhardwaj
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
There is no way to prevent the history from showing up since that is a feature. I am assuming you are worried this is happening only one 1 computer if so the only thing that can be done is this: http://www.help2go.com/article58.html
 
 
subject: How to avoid caching from History(Urgent!!!)
 
Threads others viewed
Refresh the Servlet
how to clear internet explorer history of client machine
How to avoid caching from History
Disabling IE's back button/Clearing the Browser history
Stop URLs being saved to history folder!?
MyEclipse, The Clear Choice