Re: Scripts running twice
| From: | Alexander Schrijver | Date: | Tue, 12 Oct 2010 19:42:20 +0000 |
| Subject: | Re: Scripts running twice | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-308660@lists.php.net to get a copy of this message | ||
On Tue, Oct 12, 2010 at 07:52:46PM +0100, Ashley Sheridan wrote:
>
> On Tue, 2010-10-12 at 20:45 +0200, Alexander Schrijver wrote:
>
> On Tue, Oct 12, 2010 at 05:29:39PM +0100, [1]ash@ashleysheridan.co.uk wrote:
> > That's probably it then! Some browsers make multiple requests to speed up rend
> ering of a page.
>
> Do you have any examples of browsers which do this? Because that kind of
> behaviour would be wrong.
>
> I just know that a couple of years ago, I was working on a website that
> removed credits from a clients account upon a page visit. When the page
> was accessed via a link, two credits were always taken. We did all
> sorts of tests, from writing to the DB in a single call from that page,
> and every time, it was coming up with two hits. This was happening on
> all the main browsers: Fx, IE, Opera & Safari.
> It's not the wrong behaviour, this is allowed behaviour when using the
> GET protocol, which most general page requests are I believe.
Reading the HTTP RFC this is allowed for a GET request with a range specified.
I'm not sure how PHP deals with this.