I thought I had answered this question before thanks to StackOverFlow, but I hastily took an answer and it turns out not to be the real cause to my problem.
I have checked my Apache Access Log:
This is me browsing my web app on Google Chrome Browser.
127.0.0.1 - - [06/Jan/2010:22:17:35 +0000] "GET /webs/end/new.php HTTP/1.1" 200 2146
127.0.0.1 - - [06/Jan/2010:22:17:36 +0000] "GET /webs/end/settings.php HTTP/1.1" 200 4548
127.0.0.1 - - [06/Jan/2010:22:17:38 +0000] "GET /webs/end/index.php HTTP/1.1" 200 2042
This is me browsing my web app on IE7.
127.0.0.1 - - [06/Jan/2010:22:21:49 +0000] "GET /webs/end/settings.php HTTP/1.1" 200 4548
127.0.0.1 - - [06/Jan/2010:22:21:50 +0000] "GET /webs/end/index.php HTTP/1.1" 200 2042
This is me browsing my web app on Firefox.
127.0.0.1 - - [06/Jan/2010:22:18:08 +0000] "GET /webs/end/settings.php HTTP/1.1" 200 4548
127.0.0.1 - - [06/Jan/2010:22:18:09 +0000] "GET /webs/end/settings.php HTTP/1.1" 200 4548
127.0.0.1 - - [06/Jan/2010:22:18:10 +0000] "GET /webs/end/index.php HTTP/1.1" 200 2042
127.0.0.1 - - [06/Jan/2010:22:18:10 +0000] "GET /webs/end/index.php HTTP/1.1" 200 2042
127.0.0.1 - - [06/Jan/2010:22:18:11 +0000] "GET /webs/end/new.php HTTP/1.1" 200 2146
127.0.0.1 - - [06/Jan/2010:22:18:12 +0000] "GET /webs/end/new.php HTTP/1.1" 200 2146
This is just me clicking around. But notice that for every page request firefox seems to be loading the page twice and its effecting my PHP scripts as they are executing twice and making two insertions into my DB!
Why is the case? I am using Firefox 3.5.6. I am guessing this is a Firefox issue rather than a PHP/Apache one?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…