title: Python pyramid logout not working goes back to the dashboard page on back button press
body: <p><a href="https://i.stack.imgur.com/GcPwX.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GcPwX.jpg" alt="enter image description here"></a></p>
  
  <p>This is the login dashboard that appears after successful login . When I clicked on logout it goes to the following view config where I have cleared the session and request.
  <strong>LOGOUT CODE HERE</strong></p>
  
  <pre><code>@view_config(route_name='logout',effective_principals=Authenticated,renderer='templates/index.jinja2')
  def logout(request):
      DBSession.query(User).filter(User.id==request.user.id).update({"verified":'N'}) #making the verified 'N' again
  
      session=request.session
      headers=forget(request)
      session.invalidate() #deleting the session
  
      return HTTPFound(location=request.route_url('home'),headers=headers)
  </code></pre>
  
  <p><strong>The problem is</strong>
  when I click on the back button of the browser it goes back to the same link as in the picture. Is it because my session is not being cleared or what mistake is being here. </p>