谷歌浏览器刷新没有被要求 [英] Google Chrome refreshing without been asked for it

查看:144
本文介绍了谷歌浏览器刷新没有被要求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有问题没有解决方案,需要帮助。



我使用安全代码来阻止http刷新,它会监视客户端请求是否过于突变http响应并阻止它将服务器关闭。



如果我们在页面上进行了过多的刷新,客户端会获得空白页,并显示标题为正在加载...2秒钟,然后是正常的页面加载。



为了使代码使用:meta http-equiv =刷新标记,并且由于某种原因,在确定的情况下,页面仍然不停地刷新。



我搜索了一些解决方案,并发现这是Chrome的问题,显然没有解决方案。



我尝试使用javascript验证客户端是否使用Chrome,如果Chrome不使用元标记刷新,请使用javascript进行刷新。



无论如何,Chrome仍然会出现这种行为,这让我很生气。



如果你想试试,你可以访问www.sport4u .com.br访问页面上的任何产品或链接,按F5多次(10秒),然后按下Loading title按历史记录返回按钮,然后等待。


解决方案

好吧,这很奇怪,因为它似乎是由Chrome的自动翻译功能引起。我正在使用英文Windows 7上运行的 Chrome 24.0.1312.5 dev-m ,并且当我加载 http://www.sport4u.com.br/ ,则页面每2秒自动重新加载一次。事实上,如果我查看页面源,我会得到以下内容:

 < head> 
< meta http-equiv =Content-Typecontent =text / html; charset = iso-8859-9/>

< meta http-equiv =Content-Languagecontent =tr>
< script>
window.setTimeout('window.location.reload();',2000);
< / script>
< title>正在载入...< / title>
< / head>


,您可以立即看到 reload()代码。



Chrome浏览器还弹出打开页面顶部的自动翻译栏,因为它认为该页面是葡萄牙语并提供翻译。但是,第二次重新加载(2秒后),Chrome现在认为网页是土耳其语(因为这是上面代码中的语言)!这种情况持续多次,直到Chrome终止。



如果我停用Chrome浏览器的翻译设置(chrome:// settings / search#languages)并加载页面中,没有刷新,并且查看源代码返回正确的页面。



我会建议要么Chrome不刷新页面 - 请参阅为什么Chrome不正确地确定页面使用不同的语言,并提供翻译?或修正某些字符的编码问题,这使Chrome浏览器认为页面语言错误。如果您通过 W3C验证器它显示了一个错误编码的字符,可能是原因。


I have problem without solution and need help.

I take secure code to prevent http refresh, it monitoring if the client request too mutch http response and prevent it to take the server down.

If we take too mutch refresh on page, the client gets blank page with the tittle "Loading..." for 2 seconds, and after that the normal page load.

To make that the code use:" meta http-equiv="Refresh" " tag, and by some reason on determined situation the page still refreshing without stop.

I searched for some solution, and found that was a "inssue" from Chrome and apparently with no solution.

I try use javascript to verify if client using Chrome, and if is Chrome don't refresh with meta tag, make the refresh with javascript.

Anyway, Chrome still exhibits this behavior, which is making me nuts.

If you want to try, can you access www.sport4u.com.br access any product or link on page, press F5 many times (10seconds) when you get blank screen with Loading title press "History back" button, and wait.

What can be causing this, and how can I solve it?

解决方案

OK this is very strange as it seems to be caused by Chrome's auto-translate feature. I am using Chrome 24.0.1312.5 dev-m running on English Windows 7 and when I load http://www.sport4u.com.br/ then the page automatically reloads every 2 seconds. In fact, if I view the page source I get the following:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9" />

<meta http-equiv="Content-Language" content="tr">
<script>
    window.setTimeout('window.location.reload(); ',2000);
</script>
<title>Loading...</title>
</head>


<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" bgcolor="#fff">

and immediately you can see the reload() code.

Chrome has also popped open the auto-translate bar at the top of the page as it thinks the page is in Portuguese and offers to translate it. However on the second reload (after 2 seconds) Chrome now thinks the page is in Turkish (as this is the language in the code above)! This continues many times until eventually Chrome stops. Even closing the translate bar at the top does not stop the reloading.

If I disable the Chrome translate settings (chrome://settings/search#languages) and load the page, there is no refreshing and the View Source returns the correct page.

I would suggest either instructing Chrome to not refresh the page - see Why does Chrome incorrectly determine page is in a different language and offer to translate? or fix the encoding problems with certain characters which is making Chrome think the page is in the wrong language. If you run the page through the W3C validator it shows an incorrectly encoded character which might be the cause.

这篇关于谷歌浏览器刷新没有被要求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆