New issue 64810 by dikidera: Chrome loads a page twice without user knowing
http://code.google.com/p/chromium/issues/detail?id=64810
Chrome Version :
Google Chrome 7.0.517.44 (Official Build 64615)
WebKit 534.7
V8 2.3.11.22
User Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7
Firefox 3.6.10: OK!
What steps will reproduce the problem?
1. Build a php script which will increment a field when you visit a
page/some content.
2. Visit the page with chrome.
What is the expected result?
Increment the field once ie. If it was 0 then it should be 1, if it is 1 it
should be 2.
What happens instead?
The field gets increment twice as if the script/page was executed/loaded
twice.
I was mind boggled at what the problem was so i tried Firefox and i was
surprised there were no issues there. It means Chrome is loading the
webpage twice thus i get more queries per load of the page which in turn
increases the mysql queries and get high load on the server.
This will probably happen to any developer who is counting on exact views
of some content and raise his load on the web server.
Comment #1 on issue 64810 by pe...@chromium.org: Chrome loads a page twice
without user knowing
http://code.google.com/p/chromium/issues/detail?id=64810
Thank you for reporting this issue. Can you reproduce the issue on the
following link? It's a script which increments a counter on each page-load,
it counts properly here with Chrome 9.0.587.0(dev) on Windows Vista SP2.
Counts perfectly for me as well, however on my own-coded website it
increments the mysql field twice. Firefox has no such problem.
It might be some faulty resource then. In order to properly track down this
issue we either need the URL of your website, or a reduced test-case which
reproduces the problem for you.
Sorry for the delayed answer. If you can access this website
http://manga.1gb.bg then please proceed to
http://manga.1gb.bg/display.php?id=13
There is a field where it says Views and the number of views are displayed.
Refreshing the page i see it being updated twice
I have a very similar issue. What got me was it's not Chrome reloading the
page but instead some other network. Doing an IP lookup from our logs said
it was from Tokyo.
I have a script that tests submissions of customers through a process that
is in a public directory but not indexed or linked to etc. We ran a test by
executing that script through Chrome on 2010-12-10 and that script got
re-executed by some random IP 4 times over the next two days.
Here's the IP's:
150.70.64.201
150.70.172.101
150.70.66.184
150.70.66.183
This happens almost every time we run that script or in other similar
situations. On less public/internal web applications I never have this
issue with Chrome. My first though would be this is some virus issue, but
it happens on any network or machine I use Chrome on and never happens with
Firefox/safari/etc.
dikidera, It's probably the images with empty/no src attributes on that
page. Can you remove that and try again? There's already a bug open about
that - see issue 38144.
We are facing same issue. Page_Load Method getting invoked twice.
It happens only in Chrome.
Chrome Version v12.
I'm working on a site using CodeIgniter and both native PHP sessions and
the sessions class CodeIgniter provides over top of PHP. I noticed that,
in one method in particular, I was having an issue where a page was being
called twice (but only one page, not multiple), which was resetting saved
session variables.
I tried this page on Firefox and it's not an issue.
I am running a script that inserts information into a DB. This insert is
happening twice. The page is being loaded with Chrome. This does not happen
when I use Firefox. My OS is Ubuntu, but I have tested on a Windows XP
machine with the same results. the only thing loading on the page is the
SQL statement and a Functions .php file. It happens with or without echos.
I was using the page as a pass-through. Once the db is updated the page is
redirected using a PHP header command so that there is no output to the
browser. Still had issues.
for testing the issues you can check my web site. api.enginar.in for check
the my_sql db enginar.in/sql username : enginar_db pass: 123456a
When you open the api.enginar.in url the system insert a record in account
table. You can see in phpmyadmin on enginar.in/sql.
While using chrome two record inserted. :/
This is a bug for chrome or my coding. But when i am testing in firefox, IE
9.0 and Opera there is no twice insert.
For checking error, these sites will be open until 1st June 2012. Please
help me.
The best way I have found to ensure this does not happen twice is to set a
special variable when making the entry. This should be a unique reference
number to that particular entry. If that entry is found in the DB already,
do not make the entry. I know this does not solve the Chrome issue, its
just a work-around. But at least it keeps the double entries from happening.
We find the reason. It's about favicon.ico file. Chrome request it If
my .htaccess redirect every requet into index.php the data duplication
occurs.
How can I solve this problem?
The pages that I have been having issues with do not use the favicon.ico,
and do not use the .htaccess. I am not sure how you would resolve it. If
all you are looking to do is redirect for URI rewriting, you could try
having your 404 page redirect you to the index.php page. My host lets me
use my index.php page as the 404 page, so it works great. I can use a
mixture of URI rewriting and hardcoded pages.
Hope this helps.
I have change my .htaccess file into
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !favicon.ico
RewriteRule .* index.php [L]
and my problem is solved. My problem is favicon.ico file.