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

后端 未结 6 508
天涯浪人
天涯浪人 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条回答
  •  悲哀的现实
    2020-12-09 12:16

    Depends on your login solution (SSO - Windows Live / OpenID vs homegrown, where login info is stored, etc)... Since 'back' doesn't generally request the page again, I'd suggest clearing the forms in JavaScript (OnLoad). On the server side, you can then populate them (Page_Load). Clear your session and viewstate upon logoff.

提交回复
热议问题