views:

1513

answers:

1

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

+2  A: 

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.

Grant Wagner