我在一个使用基本身份验证的网站上工作。使用Chrome我已经登录使用基本的认证。现在我想从浏览器中删除基本的身份验证细节,并尝试不同的登录。
使用Chrome浏览器时,如何清除当前的基本身份验证细节?
我在一个使用基本身份验证的网站上工作。使用Chrome我已经登录使用基本的认证。现在我想从浏览器中删除基本的身份验证细节,并尝试不同的登录。
使用Chrome浏览器时,如何清除当前的基本身份验证细节?
当前回答
我用的是Chrome 75。我发现重新启动Chrome不起作用。但是重新启动Chrome浏览器并打开开发者工具就可以了。我不知道为什么会这样。
其他回答
你可以打开一个隐身窗口Ctrl+Shift+n每次你做一个测试。隐身窗口将不记得您上次输入的用户名和密码。
要使用这个技巧,请确保关闭所有隐身窗口。所有隐身窗口共享相同的缓存。换句话说,你不能打开多个独立的隐身窗口。如果您登录其中一个窗口并打开另一个窗口,这两个窗口是相关的,您将看到新窗口记住了第一个窗口中的身份验证信息。
我用的是Chrome 75。我发现重新启动Chrome不起作用。但是重新启动Chrome浏览器并打开开发者工具就可以了。我不知道为什么会这样。
退出Chrome时,身份验证将被清除。
Note however, that by default Chrome is running apps in the background, so it may not really exit even if you close all Chrome windows. You can either change this behavior under advanced setting, or e.g. under Windows, you can completely exit Chrome by using the Chrome icon in the systray. There should be an icon if Chrome is still running, but maybe you'll find it only in the popup with the hidden icons. The context menu of the Chrome icon has an entry to completely exit Chrome, and you can also change the setting for running apps in the background using that menu.
打开Chrome菜单 选择设置 滚动到底部 单击“显示高级设置…” 滚动到底部 在“系统”下取消选中“当谷歌Chrome浏览器关闭时继续运行后台应用程序”的复选框
function logout(url){
var str = url.replace("http://", "http://" + new Date().getTime() + "@");
var xmlhttp;
if (window.XMLHttpRequest) xmlhttp=new XMLHttpRequest();
else xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4) location.reload();
}
xmlhttp.open("GET",str,true);
xmlhttp.setRequestHeader("Authorization","Basic YXNkc2E6")
xmlhttp.send();
return false;
}
可能是老帖子了,但想过添加答案来帮助别人。
我在高级ReST客户端应用程序中也遇到了同样的问题,我无法从Chrome和应用程序中清除基本的身份验证。它只是停止要求凭据!
然而,我设法使它通过重新启动Chrome使用关于谷歌Chrome ->重新启动。
一旦Chrome重新启动,当我访问ReST服务,它会要求用户名和密码使用基本身份验证弹出。
希望这能有所帮助!