java - how to disable back button- browser without using javascript i want to use servlet -


i facing problems in application(built using jsp/servlet) when user clicks browser's button.how servlet should coded in such way detects browser's button event , performs no action.i not allowed use javascript.

apparently pages been requested browser cache. you'll need disable client-side caching of pages in question. can creating filter listens on url-pattern of pages you'd disable cache for, such *.jsp. following in dofilter() method:

httpservletresponse httpres = (httpservletresponse) response; httpres.setheader("cache-control", "no-cache, no-store, must-revalidate"); // http 1.1. httpres.setheader("pragma", "no-cache"); // http 1.0. httpres.setdateheader("expires", 0); // proxies. chain.dofilter(request, response); 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -