Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to clear browser's cache from server side?

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?

like image 807
Dunith Dhanushka Avatar asked Apr 05 '10 03:04

Dunith Dhanushka


1 Answers

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

Expires: 0
Cache-control: private
like image 115
Marcelo Cantos Avatar answered Sep 28 '22 21:09

Marcelo Cantos