如何确保 IE 8 永远不会缓存我的数据

发布于 2024-11-06 12:02:34 字数 826 浏览 0 评论 0原文

我有以下 2 个页面:

  • check-cookie.html,它检查用户是否有给定的 cookie
  • set-cookie.html,它设置给定的用户 cookie

在 IE 8 中,我使用空缓存/cookie 执行以下操作文件:

  1. 加载 check-cookie.html。我得到“无 cookie”输出,如预期的
  2. Load set-cookie.html,它设置用户 cookie
  3. Load check-cookie.html。我得到正确的“cookie present”输出
  4. 删除我的cookie并清除缓存。
  5. 重新加载 check-cookie.html。即使我的 cookie/缓存是清晰的,我仍然得到“cookie present”输出。
  6. 关闭 IE8 浏览器并重新打开,加载 check-cookie.html。我现在得到“无 cookie”输出。

Microsoft 网站对此进行了记录:http://windows.microsoft。 com/en-us/Windows7/Delete-webpage-history

本质上,即使缓存文件已被清除,但其中一些文件仍存储在内存中,因此您需要关闭浏览器才能完全清除缓存。有谁知道如何绕过这个 IE 限制?

仅供参考,我使用以下无缓存标头: 缓存控制:无缓存、无存储、必须重新验证、后检查=0、预检查=0 编译指示:无缓存

I have the following 2 pages:

  • check-cookie.html, which checks to see if a user has a given cookie
  • set-cookie.html, which sets a given user cookie

In IE 8, I do the following with an empty cache/cookie file:

  1. Load check-cookie.html. I get a 'no cookie' output, as expected
  2. Load set-cookie.html, which sets a user cookie
  3. Load check-cookie.html. I get the correct 'cookie present' output
  4. Delete my cookies and clear the cache.
  5. Reload check-cookie.html. I still get 'cookie present' output, even though my cookie/cache are clear.
  6. Close the IE8 browser and reopen it, loading check-cookie.html. I now get a 'no cookie' output.

This is documented on the Microsoft site here: http://windows.microsoft.com/en-us/Windows7/Delete-webpage-history.

Essentially, even though the cache files have been cleared, some of it is stored in memory so you need to close the browser to clear the cache fully. Does anyone know how to get around this IE limitation?

FYI, I am using the following no cache headers:
Cache-Control: no-cache,no-store,must-revalidate,post-check=0,pre-check=0
Pragma: no-cache

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

笑看君怀她人 2024-11-13 12:02:34

您的 cookie 可能是会话 cookie,而不是持久 cookie。 IE 中的“缓存”指的是 Internet 临时文件文件夹。会话cookie仅存储在内存中,当浏览器运行时,仅持久cookie存储在缓存中。

IE8 中没有选项可以删除所有会话 cookie。删除 cookie 功能仅删除“存储在您的计算机上”的 cookie,即您的临时 Internet 文件文件夹中的持久 cookie。

您的会话cookie没有被缓存,我认为您对“缓存”的期望/解释让您感到困扰。

您是否有更高级别的问题或者您认为需要解决?我认为会话 cookie 没有问题,只有在浏览器退出时才会被丢弃。什么场景?

Your cookie is probably a session cookie and not a persistent cookie. "The Cache" in IE refers to your Temporary Internet Files folder. Session cookies are only stored in memory, whilst the browser is running, only persistent cookies are stored in the cache.

There is no option in IE8 to delete all your session cookies. The delete cookies function only deletes cookies "stored on your computer", meaning, persistent cookies in your Temporary Internet Files folder.

Your session cookies are not being cached, I think it is your expectation/interpretation of "cache" that is troubling you.

Do you have a higher-level problem or that you believe needs to be fixed? I see no issue in session cookies only being discarded when the browser exits. What's the scenario?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文