Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: Synchronous XMLHttpRequest deprecated Date: Mon, 06 Apr 2015 14:11:56 +0200 Organization: PointedEars Software (PES) Lines: 46 Message-ID: <3049656.CVpVeAz9R9@PointedEars.de> References: <5521ac06$0$2891$e4fe514c@news2.news.xs4all.nl> Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Trace: solani.org 1428322441 5073 eJwFwQkBwDAIA0BLgfCscgoU/xJ25wyJTgsP8/VF9YV/RcbNnGR346Bej6zU4ZTprgqoWHs/J3ARcg== (6 Apr 2015 12:14:01 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Mon, 6 Apr 2015 12:14:01 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwNyskBwCAIBMCWFNhFyokc/Zdg5j1QbqYbQcNgRnT1lW/mdNUx06gMie299qEvpLpXki6NOwWNZoSkgX97V88U+A== Cancel-Lock: sha1:E+oh/VKI3Gokmp18E2FD8qPc+B4= X-NNTP-Posting-Host: eJwNyMERACEIA8CWwEByluOA9F+Ct89N0FkKJiMnx447h4p1qZa+7R2Kwj5cVvUvUugwqXHxAAJcECE= Xref: csiph.com comp.lang.javascript:27204 Silvio wrote: > On 04/05/2015 01:34 AM, Chuck Anderson wrote: >> The current Firefox displays this warning in the console when I use a >> synchronous XMLHttpRequest. >> >> "Synchronous XMLHttpRequest on the main thread is deprecated because of >> its detrimental effects to the end user's experience. For more help >> http://xhr.spec.whatwg.org/" >> >> I've read about the reasoning and understand the logic, ... although I >> believe this should be a decision left up to the page designer and not >> dictated by the browser developers. > > It is a bad decision to not leave it to the developer. They who can read have the advantage here. It is a *warning*, not an error message. The developer can disable the display of warnings. They do not even have to use the Console. > There is an important use of synchronous requests that can not be emulated > using asynchronous ones: > > - user triggers an event (onclick for example) > - event code does a synchronous requests > - the response is used to open a new browser window with a URL that is > part of the response > > The last part can be any action that is rejected outside user initiated > code. This will not work with any async scenario since an async response > handler does not count as user initiated. I do not see your point. Why exactly can that not be done in a user- friendly, non-blocking, asychronous way? > Who came up with this idea for deprecatio?. Can someone point me to the > place where this is (or has been) discussed? It has been the standing recommendation for several years now, here and elsewhere. -- PointedEars FAQ: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not cc me. / Bitte keine Kopien per E-Mail.