如何强制清除用户的缓存/cookie? [英] How to force clear user's cache/cookies?

查看:138
本文介绍了如何强制清除用户的缓存/cookie?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以强制清除用户的缓存和/或Cookie?尤其是在Safari/Webkit中.

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

非常感谢!

推荐答案

是.诱使用户选择适当的菜单项,以清除其cookie和缓存.我开玩笑!那将被称为社会工程"型黑客攻击,对于那些希望避免法律麻烦的人来说是不可取的.

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>

这仅控制您自己的网页,通常不控制缓存.当然,您可以将自己网站的Cookie设置为所需的任何内容.

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.

这篇关于如何强制清除用户的缓存/cookie?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆