Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This is a solution for this problem that works in IE6 and higher.</p> <pre><code>&lt;asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="logout();"&gt;LinkButton&lt;/asp:LinkButton&gt; &lt;script&gt; function logout() { document.execCommand("ClearAuthenticationCache",false); } &lt;/script&gt; </code></pre> <p>Found this from <a href="http://msdn.microsoft.com/en-us/library/bb250510%28VS.85%29.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/bb250510%28VS.85%29.aspx</a></p> <p>Web Team in Short Your Credentials, Please</p> <p>Q: Jerry B. writes, "After the user has validated and processed his request, I now want to invalidate him. Assuming this machine is in an open environment where anyone could walk up and us it, I want to throw a new challenge each time a user accesses a particular module on the Web."</p> <p>A: This is a frequently requested feature of the Internet Explorer team and the good people over there have given us a way to do it in Internet Explorer 6.0 SP1. All you need to do is call the execCommand method on the document, passing in ClearAuthenticationCache as the command parameter, like this:</p> <pre><code>document.execCommand("ClearAuthenticationCache"); </code></pre> <p>This command flushes all credentials in the cache, such that if the user requests a resource that needs authentication, the prompt for authentication occurs again.</p> <p>I put this on my logout link button and it works in IE6 sp1 and higher:</p> <pre><code>OnClientClick="document.execCommand('ClearAuthenticationCache');" </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload