javascript - Back button filter not working -


I have configured a filter to disable the back button on my browser and when the session ends, is shown. This is working as expected when my application is configured in prototype, but when I have included it in my (Spring MVC) application, it does not work.

I have configured my filter like this

  & lt; Filter & gt; & Lt; Filter-name & gt; BackButtonFilter & lt; / Filter-name & gt; & Lt; Filter range & gt; Com.filters.BackButtonFilter & lt; / Filter-class & gt; & Lt; / Filter & gt; & Lt; Filter-mapping & gt; & Lt; Filter-name & gt; BackButtonFilter & lt; / Filter-name & gt; & Lt; URL pattern & gt; / * & Lt; / URL pattern & gt; & Lt; / Filter-mapping & gt;  

And I had such a filter element

  response.setHeader ("Cash-control", "No-cache, no-store, Re-verified "); Response.setHeader ("pragma", "no-cache"); Response.setDateHeader ("Ended", 0); Response.setHeader ("cache-type", "private");  

I have presented the log statement to see if my filter is being executed or not. I can see it execute.

Why is this happening?

May I suggest using the HTTP header to see the end of the browser?

Edit To see one thing, make sure that the HTTP header is being written before all HTTP Body


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -