how to clear authentication cache on ie7 with Javascript?

空扰寡人 提交于 2019-12-21 06:57:30

问题


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...


回答1:


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.

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

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. 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.



来源:https://stackoverflow.com/questions/1205045/how-to-clear-authentication-cache-on-ie7-with-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!