posted 14 years ago
I am setting the attribute of the session for logout to null. I am checking the same session variable in the filter for valid login. If the attribute is null, I am trying to prevent caching of the page. This way , I am trying to prevent the user to view the visited pages after logout using Internet Explorer's BACK button.
The conditionally setting of the response headers is not working for me.
Here,s the code: For logout:
I am checking the userLogger attribute of the session in the filter as:
If the condition is removed from the code. The response headers are set and the user is prevented to view the visited pages after logout.
Also, the print statement prints: Response Committed:false.
Note: I am using this in a GRAILS application. Since, the issue is with the response and setting the headers , I have posted it here.
Thanks and regards,
Nitin