Closed arvgta closed 4 years ago
This is a subset of this larger issue and was solved during this commit by enabling a new semaphore mechanism, which prevents thrashing on the same URL..
Because enabling the semaphore was placed in the common _request()
handler, in addition to normal click requests, GET and POST of form requests are also locked....
New code
In the (common) _request()
handler, the following code enables the semaphore:
$.rq("!"); //we're serious about this request - disable further fetches on same URL
In the $.rq()
sub-plugin, the following changes were made (second constraint of the OR condition):
if(o === "=") {
return h === currentURL //check whether internally stored "href" ("h") variable is the same as the global currentURL
|| h === l; //or href of last request ("l") //this constraint is new
}
...and...
if(o === "!") return l = h; //store href in "l" (last request)
Tested to work fine... Thus closing... If you have any funnies, please re-open
Just to mention that current semaphore, altogether with f876773 fix, covers only Option 2 -> Situation 1 from #179 issue, which caused most of the refreshes. While Option 1 and Option 2 -> Situation 2 are not covered yet.
In case of partner site, where refresh is set to false, the only thing that causes periodic refresh is Option 2 -> Situation 2 from #179.
...in a JavaScript environment.
This is the issue of "Edin's ideas" which I would like to tackle first.
Original reporting of the bug:
The bug was reproduced on several sites including: