PHP Classes

i've noticed IE send duplicate requests

Recommend this page to a friend!

      AJAX Locking  >  All threads  >  i've noticed IE send duplicate requests  >  (Un) Subscribe thread alerts  
Subject:i've noticed IE send duplicate requests
Summary:Does this also help if a race condition occurs?
Messages:2
Author:Abraham Elias
Date:2007-01-21 23:59:48
Update:2007-01-22 13:39:35
 

  1. i've noticed IE send duplicate requests   Reply   Report abuse  
Picture of Abraham Elias Abraham Elias - 2007-01-21 23:59:48
I;ve noticed that 1 out of every 1000 requests, IE will send the same exact request to the server twice. same time same header info, everything. (From the same user)

  2. Re: i've noticed IE send duplicate requests   Reply   Report abuse  
Picture of Fabio Ambrosanio Fabio Ambrosanio - 2007-01-22 13:39:35 - In reply to message 1 from Abraham Elias
IE is always a source of surprise.

I think that two identical calls produce no real side-effects.
If both enter into the critical section (inside lock method),
one overwrite the other, but it is not a matter, because params are the same.

Actually, lock methods I wrote had no monitor/barrier mechanism to serialize access and there is the possibility that two calls from different users, for the same resource, at the same time, will produce a result than is not "really right".

In a collaborative environment, such as that I wrote the class for, it is not a real problem because a subseguent call of status will advice one of contenders that he/she has lost (the lock). The loser probably has to choose another task.

In a scenario like a e-commerce site, this is not acceptable and there is the need to add a monitor to the lock method. It is very simple to add a check if the resource is still free inside the transaction of MDB2 driver (or of any db driver).