This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
i hav developed a banking application using servlets - jdbc. when the account holder enters the servlet he gives his acc no and password on the basis of which he performs his deposit and withdrawal operations. i dont want subsequent users or the same user from the same browser to see the transactions he has done. how do igo about it
There is no way of doing it except make the browser not to make a cache of your page. Please make a search in this forum. This question came up many times before.
You can set the header from the servlet before you write out anything to the client to effectivly remove any cached pages. response.setHeader("Cache-Control", "no-cache"); response.setHeader("Expires", "Thu, 01 Dec 1994 16:00:00 GMT"); This will not allow the use of the browser's back button (actually, you can use the back button all you want but you'll have to refresh to see any content). Sean
hi my friend anand has done a little trick and it works.. just add javascript lines to your code.
<script language="Javascript"> javascript:window.history.forward(1); </script> it's nothing but if user click on back button he will be forwarded to the current page only.. Bhupendra
Bhupender, Wouldn't this little trick just solve the above problem for only one click, but a user could then look at the back button's history list or even just click back twice and get around the trick? OP
Mahajan Bhupendra
Ranch Hand
Joined: Dec 01, 2000
Posts: 118
posted
0
yes of course it will work for only one back.. something is better than nothing don't u think so??? Bhupendra
maha anna
Ranch Hand
Joined: Jan 31, 2000
Posts: 1467
posted
0
Yes. We can make it harder for the user to go back but not impossible. regds maha anna