How to clear browser's cache from server side?

2019-04-24 18:51发布

I have to create a web application that deals with user's sensitive information. I need to immediately clear the browser's cache after user logs out since cached data would be vulnerable. Client's browser should be enforced to clear the Cache from server side. Also all cache policies must be exposed to the client from the server side.

Is there any solution to this problem?

1条回答
Fickle 薄情
2楼-- · 2019-04-24 18:59

Set the response to expire immediately, and for good measure tell proxies, etc., not to cache:

Expires: 0
Cache-control: private
查看更多
登录 后发表回答