Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force clear user's cache/cookies?

Is there any way to force clear users cache and/or cookies? Especially in Safari/Webkit.

Many thanks!

like image 873
eozzy Avatar asked Sep 25 '10 16:09

eozzy


1 Answers

Yes. Trick the user into selecting the appropriate menu item which clears their cookies and cache. I kid! That would be called "social engineering" type of hacking and is inadvisable for those wishing to stay clear of legal troubles.

There are a couple of tags that may be useful, depending on what you want to do:

<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<META HTTP-EQUIV="Refresh" CONTENT=...time>

This only controls your own web page, not the cache in general. Of course, you can set your own site's cookies to whatever you want.

like image 194
paul Avatar answered Oct 05 '22 23:10

paul