如何使用Javascript清除ie7上的身份验证缓存? [英] how to clear authentication cache on ie7 with Javascript?

查看:67
本文介绍了如何使用Javascript清除ie7上的身份验证缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们需要使用Javascript清除IE中的身份验证缓存。在IE6上我们使用: document.execCommand('ClearAuthenticationCache'); 并且它可以工作。在IE7上它不起作用。

We need to clear the authentication cache in IE with Javascript. On IE6 we use: document.execCommand('ClearAuthenticationCache'); and it works. On IE7 it doesnt work.

我该怎么办?谢谢...

what can i do? thanks...

推荐答案

您是否看到任何JavaScript错误(左下角有一个黄色的感叹号图标)?你能提供更多细节吗?您是否绝对确定正在执行的代码行(尝试在其上方和下方添加 alert('execCommand'); )。在Internet Explorer 6中工作但在Internet Explorer 7中不起作用的某些其他JavaScript错误可能会阻止执行该行代码。

Are you seeing any JavaScript errors (a yellow exclamation mark icon in the lower left corner)? Can you provide more details? Are you absolutely certain that line of code is executing (try adding alert('execCommand'); above and below it). It is possible some other JavaScript error caused by something that works in Internet Explorer 6 but does not work in Internet Explorer 7 is preventing that line of code from executing.

根据 IDM_CLEARAUTHENTICATIONCACHE命令文档在Internet Explorer 6 SP1及更高版本中可以使用。

According to the IDM_CLEARAUTHENTICATIONCACHE Command documentation it works in Internet Explorer 6 SP1 and above.

我在Internet Explorer 7和8中尝试过 document.execCommand('ClearAuthenticationCache') 。我甚至没有在我的页面源中。

I just tried document.execCommand('ClearAuthenticationCache') in Internet Explorer 7 and 8 and it worked in both. I didn't even have it in my page source.


  1. 我去了一个需要身份验证的页面。

  2. 我已登录。

  3. 我离开那个页面,然后再回来,我没有必要重新进行身份验证。

  4. 然后我粘贴了 javascript:void( document.execCommand('ClearAuthenticationCache')); 进入地址栏。

  5. 我离开了页面并再次返回,我不得不重新进行身份验证。

  1. I went to a page requiring authentication.
  2. I logged in.
  3. I navigated away from that page, then back again, I did not have to re-authenticate.
  4. I then pasted javascript:void(document.execCommand('ClearAuthenticationCache')); into the address bar.
  5. I navigated away from the page and back again and I had to re-authenticate.

您能否确认以上步骤对您不起作用?

Can you verify that the above steps are not working for you?

您是否有可能用于测试的问题页面?

Do you have a page where this problem is occurring that we could use for testing?

编辑您的问题以及您可以提供的任何其他信息。谢谢。

Please edit your question with any other information you can provide. Thanks.

这篇关于如何使用Javascript清除ie7上的身份验证缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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