[Javascript] Kill the history?????

Peter Brunone peter at brunone.com
Thu Jun 20 09:15:24 CDT 2002


Wayne,

	How are you trying to control the cache?  This is better done from the
server than from the browser.  If this might work for you, you can find the
proper headers at http://learnasp.com/learn/cachenomore.asp (the headers
work regardless of server type, but the commands will be slightly different
for other platforms).
	Clearing history is generally frowned upon (and is also rather difficult).
Covering your tracks, however, is acceptable.  Use JavaScript's
window.location.replace("yourpagehere.html") to log out, and you'll find
that the page before that has ceased to exist.  You could extend this to
work throughout your site, so from the moment you step in, there is no
history of your logged-in self.
	A third way would be to use cookies, but of course not everyone supports
them... then again, if you're going to have private content of some sort,
they must obviously care enough about the site to log in, so you could just
make it a requirement.

Cheers,

Peter

|-----Original Message-----
|From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
|Behalf Of Allen Wayne
|
|Hi All,
|
|any ideas how to stop a page appearing where a user hits the back button? I
|have tried the html cash control and page expires with now sucess... now
|into javascript. The problem is if a user logs out I dont want
|anyone to hit
|the back button and see the previous page (before the logout) any ideas????
|
|
|Wayne
|




More information about the Javascript mailing list