Closed Bug 403535 Opened 18 years ago Closed 18 years ago

Synchronous AJAX locks the whole browser until reply is received

Categories

(Firefox :: General, defect)

x86
Linux
defect
Not set
critical

Tracking

()

RESOLVED DUPLICATE of bug 190313

People

(Reporter: egmont, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.6) Gecko/20060201 Firefox/2.0.0.6 (Ubuntu-dapper) Build Identifier: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.6) Gecko/20060201 Firefox/2.0.0.6 (Ubuntu-dapper) If you make synchronous ajax call, firefox blocks until the whole reply is received, you can do absolutely nothing. This makes a pretty bad user experience if visiting pages that use synchronous ajax calls. Now I have approx. 20 pages open, some of them regularly use sync ajax calls and the answer takes from below one second to up to a half minute if network connection has performance problems. This make it a real pain to use simple normal sites in other tabs, FF quite often hangs for several tens of seconds. Furthermore I think it's a huge security (DoS) problem. If someone can make you visit a malicious site where he initiates a synchronous ajax call to a server that doesn't close the http connection in a reasonable time, your only chance is to brutally kill firefox, losing all your unsaved work. Reproducible: Always Steps to Reproduce: 1. Preferable open some tabs and/or some windows. 2. Go to http://www.cs.bme.hu/~egmont/ajax.html 3. Click on the button on that page Actual Results: The whole browser is unusable for 30 seconds. Actually as long as the connection is open. This URL just happens to query a php script that sleeps for 30 seconds. You cannot access menus, cannot switch tabs or windows, cannot close this tab, cannot abort the ajax call, firefox window doesn't refresh. Expected Results: The AJAX call should be synchronous only inside the javascript of this page. That is, it's perfectly okay if this tab doesn't respond. But I should be able to use other windows and tabs of firefox; it should allow switching between them; javascript on other pages (or other iframes within this page) should keep on running; I should be able to close them, invoke firefox's menu, quit firefox and so on.
This should be fixed in Firefox 3, as I understand it. Perhaps you could try out a nightly build like the one in http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/ to confirm?
Group: security
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
Any chance to get it backported to 2.x? Or would it be too complicated?
Not much chance; it was a pretty complete rewrite of event handling and still has a number of outstanding regressions from it.
You need to log in before you can comment on or make changes to this bug.