是否可以在IE11中阻止cookie

时间:2018-06-08 09:14:31

标签: internet-explorer-11

我正在测试(在Windows 7 64位上的localhost上)阻止cookie时我的Web应用程序的行为。

在IE11上测试时,似乎你无法阻止cookie,即使IE11设置显示我已经阻止了cookie。(我也试过卸载并重新安装IE11,以防万一有什么东西坏了,但是无法阻止饼干。)

我已经研究并去过以下地方,但没有答案;

  1. Cookies disable doesn't work in Internet Explorer 11 using advance setting
  2. Cookie disabled issue in IE
  3. document.cookie is still accessible on IE11, even though cookies are disabled
  4. https://superuser.com/questions/1000545/internet-explorer-11-cant-disable-localhost-cookies
  5. 或者可能我应该忘记Internet Explorer? (提前感谢编码社区)

1 个答案:

答案 0 :(得分:0)

我认为您与我面临着同样的问题。我也搜索了很多。 我发现Cookie设置仅会影响包含真实域的网站(例如:examples.com,abc.net等)

  1. 您可以通过在(C:\ Windows \ System32 \ drivers \ etc)中编辑主机文件来更改localhost域。

  2. 在该文本文件的末尾添加一行,如下所示:

127.0.0.1 testweb.net

现在,每当您键入testweb.net时,它将返回与本地主机相同的页面。