How to clear browser's cache from server side?

血红的双手。 提交于 2019-12-22 05:04:09

问题


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:


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

Expires: 0
Cache-control: private


来源:https://stackoverflow.com/questions/2576721/how-to-clear-browsers-cache-from-server-side

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!