Reputation: 1156
In my Grails app I use session.invalidate()
to deal with a timeout. When a user is redirected to the timeout page due to inactivity the session is invalidated.
My problem is that when the user goes back, the session is somehow restored. I've tried adding
<META Http-Equiv="Cache-Control" Content="no-cache">
<META Http-Equiv="Pragma" Content="no-cache">
<META Http-Equiv="Expires" Content="0">
as well as
<%
response.setHeader("Cache-Control","no-cache, no-store");
response.setHeader("Expires","-1");
%>
to my gsp's to prevent the session from being reloaded, but it's not working. Does anyone know how to handle this issue?
Thanks
Upvotes: 1
Views: 1783
Reputation: 1156
The solution I wound up using was to add an isInvalid attribute to the servlet context.
Upvotes: 1