页面加载两次在谷歌浏览器 [英] page loads twice in Google chrome

查看:471
本文介绍了页面加载两次在谷歌浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人有谷歌浏览器的Page_Load被执行两次的任何问题?
这是一个简短的问题,我不知道还有什么解释...

Does anyone have any problems with Page_Load being executed twice in Google Chrome? It's a short question, i do not know what else to explain...

我有一个简单的asp.net页面,并在Firefox和IE的所有它的正常工作。
但在Chrome在Page_Load被激发两次...

I have a simple asp.net page and in Firefox and IE all it's working fine. But in Chrome the Page_Load is fired twice...

任何人有任何想法,为什么?

Anyone has any ideas why?

后来编辑:
- 令人奇怪的是,我有4个中继器...随机值绑定。随机方法两次发射(因为加载页面的两倍),但中继器采用初始值...所以,第二回发是某种渲染步骤后​​提出的。

Later - what is strange is that i have 4 repeaters... binded with random values. The random methods are twice fired (because of page loaded twice) but the repeaters takes the INITIALLY values...so, the 2nd post back is somehow raised after the rendering step.

3日编辑:它发生只在刷新

3rd edit: It happens ONLY at the refresh!

解决方案(在我的情况):有一个空的IMG SRC,这是原因

Solution (in my case): There was an empty img src, and that was the cause

推荐答案

我注意到IE浏览器同样的问题,如果页面包含不具有src属性(或SRC是空的,等等)img标签。不知道是否铬做同样的事情,但值得一试吧?

I notice this same issue in IE if the page contains img tags that don't have a src attribute (or the src is empty, etc). Not sure if Chrome does the same thing, but worth checking, right?

这篇关于页面加载两次在谷歌浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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