Android chrome被散列弄糊涂了
这是安卓Chrome,摩托罗拉MOTOG旧版非4g版 我正在使用表单身份验证。会话超时时,用户将重定向回登录页面。假设他们所在的url为: …/Controller/indexsection 1 他们的目的是: …/Logon?ReturnUrl=/Controller/indexsection 1 除了Android chrome,其他浏览器都可以,在登录页面的chrome上,文本框或按钮都不起作用,就好像我根本没有点击页面一样 经过相当多的尝试和错误,我发现我可以通过剥离该部分来解决这个问题 问题是,典型的流程是这样的 会话超时,返回错误页 有人点击backbutton,这会将他们带到上一页,形成身份验证 将它们重定向到查询字符串中包含哈希的url。 如何从表单身份验证重定向中删除哈希Android chrome被散列弄糊涂了,android,asp.net-mvc,google-chrome,forms-authentication,Android,Asp.net Mvc,Google Chrome,Forms Authentication,这是安卓Chrome,摩托罗拉MOTOG旧版非4g版 我正在使用表单身份验证。会话超时时,用户将重定向回登录页面。假设他们所在的url为: …/Controller/indexsection 1 他们的目的是: …/Logon?ReturnUrl=/Controller/indexsection 1 除了Android chrome,其他浏览器都可以,在登录页面的chrome上,文本框或按钮都不起作用,就好像我根本没有点击页面一样 经过相当多的尝试和错误,我发现我可以通过剥离该部分来解决这个问题
谢谢你,这是我解决这个问题的方法。我不喜欢它,但它现在起作用了 如果设置了,我无法删除哈希值
window.location.hash = '' // (or null for that matter)
然后你会遇到同样的问题,因为url现在看起来像“索引”
所以我把散列改为登录页面“content”上的散列,这样问题就解决了
function TestForAndroidError()
{
var index = window.location.href.indexOf( '#content' );
if ( index > -1 )
return;
index = window.location.href.indexOf('#');
if ( index > -1 )
{
// @* We can't seem to remove the hash but we can change it *@
window.location.hash = 'content';
}
}
TestForAndroidError();