I have basic authentication enabled in my site. I able to clear user credential in IE, Mozilla and Chrome but not able to clear credential from Safari.
I tried the following
Calling an Ajax request and setting status code to
401
Calling an Ajax request with username passed in URL: http://invalidUSer@site.com
But both of them are not working properly. Whenever I close and open a new safari credentials are not at all removed.
Below is the code snippet:
In logoout Page i have following scripts:
$.ajax({
type: "POST",
contentType: "application/javascript",
async: true,
url: "../ClearAuthentication.aspx"
});
And in ClearAuthentication.aspx.vb
'Context.Response.Redirect("http://www.test.com", False) ' have tried this both adding and removing
Response.StatusCode = 401
Page.Response.StatusDescription = "Unauthorized"
'Page.Response.AppendHeader("WWW-Authenticate", "Basic realm=""foo""") ' have tried this both adding and removing
Context.Response.End()