easiest way to prevent the back button of your browser from showing secure data after a user logs out?

后端 未结 6 488
天涯浪人
天涯浪人 2020-12-09 11:55

In a normal web app w/ login and secure data, what is an easy way to secure that data and prevent it from being seen by using the browser\'s back button, once a user logs ou

6条回答
  •  萌比男神i
    2020-12-09 12:16

    Here's a useful browser caching guide.

    You want to set the cache-control and expiration date headers (setting a date in the past), e.g.

     Cache-Control: no-cache
     Expires: Fri, 31 Dec 1998 12:00:00 GMT
    

提交回复
热议问题