Time Wasted

Feb. 8th, 2006 02:11 pm
kingandy: (Default)
[personal profile] kingandy
Just spent two hours trying to track down what appeared to be a perculiar coldfusion error - Paul had noticed certain pages on our server were apparently executing twice, thus spooning the data in the database. There was some hint of other people on the intereweb encountering this same error, lending credence to the "Coldfusion fault" theory. We tried the page in question on different servers. We tried stripping out the superfluous code, leaving only a single, simple statement. We created a dummy page, with only a single statement, in an entirely unrelated application with no commonalities whatsoever. Through all this, the double submission persisted.

Then I created a dummy page, with a single statement, and it did not happen. The information was only inserted once. At this I scratched my head, and tried to look for differences between my page and his. There were none. Commonalities between playground and live server? Very few, all discounted. There was much headscratching.

Then Paul took a look at my dummy page, and announced that it was loading the page twice.

A moment's pause. A brief experiment, invoving both of us looking at that page moments apart. The thought occurs that perhaps the common element here is, in fact, Paul's computer.

Specifically, Paul's web browser.

Paul had the Navibar extension installed in Firefox. Which, as intended, was re-loading each page after Paul visited it with the purpose of building a sitemap.

D'oh!

[EDIT: "submitting" changed to "executing". For correctness.]

Date: 2006-02-08 04:20 pm (UTC)
From: [identity profile] paulgregory.livejournal.com
I have experienced that in the past. If I remember right it's one of the reasons I installed HTML Validator. A quick check of 1.5 in v-Anne-illa mode (doing view source on http://www.timeanddate.com/worldclock and seeing if the seconds change) appears to shows that it no longer does it. Yay.

Date: 2006-02-08 05:29 pm (UTC)
From: [identity profile] blufive.livejournal.com
Some versions of Moz used to do that, but it was fixed long ago (Bug 40867 I believe).

As [livejournal.com profile] stsquad pointed out above, GET requests which actually affect state on the server are Considered Harmful. That said, there's all sorts of Web 2.0-type stuff which ignores that rule, and gets bitten grand-stylee by assorted automated spiders/tools as a result. IIRC, there was a hoo-hah last year when people discovered that having some popular web tool installed when you visited (GMail? maybe something else) nuked swathes of your data as it automagically fetched every link on the page, including the "delete" links...

It's also worth noting that there's an obscure bug in Moz-flavoured browsers which can lead to them double-submitting GET requests (Bug 236858) but you've really got to be working to hit that (vicious cache-control headers, plus mis-matched content-type headers)

March 2012

S M T W T F S
    123
45678910
11121314151617
18192021222324
25 262728293031

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Dec. 30th, 2025 08:29 pm
Powered by Dreamwidth Studios