Flask- Back Button Returns to Session Even after Logout

flask

Solution

Use the `Cache-Control` header to prevent a page from being cached.

response.headers.add('Cache-Control', 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0')   

Problem

I am creating a website using flask that requires logging in and out. I am using Flask-Security to help with this. My problem is that after I log out, if I hit the back button, I return to the user's page. Is there a way to prevent returning to a session after logging out by pressing the back button in Flask?

Original source