简体   繁体   English

网页在Google Chrome(Mac)上加载了三次

[英]Page loads three times on Google Chrome (Mac)

Check out this page: http://tinyurl.com/chrome-loads-thrice . 查看此页面: http : //tinyurl.com/chrome-loads-thrice

When accessed via Google Chrome (OSX, 37.0.2062.122), it loads three times. 通过Google Chrome浏览器(OSX,37.0.2062.122)访问时,它将加载三次。 The number you see is the number of times the page has loaded. 您看到的数字是页面加载的次数。

The first load give me 1, the second load gives 3, then 5, 7 , 9, 11... 第一个负载给我1,第二个负载给我3,然后是5、7、9、11 ...

It looks like this in code: 在代码中看起来像这样:

session_start();

$count = isset($_SESSION['test_counts']) ? $_SESSION['test_counts'] : 1;
$_SESSION['test_counts'] = $count + 1; 

printHeader();
echo '<p>'.$_SESSION['test_counts'].'</p>';
printFooter();

I can't give the contents of those functions, but you can see their output. 我无法提供这些功能的内容,但您可以看到它们的输出。 Without printHeader and printFooter, the page loads with normal counts. 没有printHeader和printFooter,页面将以正常计数加载。

It is a bug in Google Chrome. 这是Google Chrome浏览器中的错误。 It looks like they are working on it. 看来他们正在努力。

https://code.google.com/p/chromium/issues/detail?id=420070 https://code.google.com/p/chromium/issues/detail?id=420070

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM