Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #14054
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!weretis.net!feeder4.news.weretis.net!storethat.news.telefonica.de!telefonica.de!news-2.dfn.de!news.dfn.de!news.uni-stuttgart.de!news.belwue.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail |
|---|---|
| Content-Type | text/plain; charset="UTF-8" |
| Message-ID | <2104344.5D107XkKLB@PointedEars.de> (permalink) |
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Reply-To | Thomas 'PointedEars' Lahn <cljs@PointedEars.de> |
| Organization | PointedEars Software (PES) |
| Date | Mon, 21 May 2012 18:31:21 +0200 |
| User-Agent | KNode/4.4.11 |
| Content-Transfer-Encoding | 8Bit |
| X-Face | %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&.<b';Md8`dH6iqhT)6C^.Px|[=M@7=Ik[_w<%n1Up"LPQNu2m8|L!/3iby{-]A+#YE}Kl{Cw$\U!kD%K}\2jz"QQP6Uqr],./"?;=4v |
| Face | iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXTxa4RFk5dUWANED8PFEfy7+MGBiW+n3ZNF/QuAAACaElEQVQ4jVXUwVOcMBQG8Dc7Rc4PUntdWV2uxjDpGaGeozOp1woar4jd5t/v9wLstMwsA/ntlxdCAgUc1hjTc9/JCZfGoo3wG3HdmdAWrIJRHe7GM/TmpY5VFefuVcAkkPbLIaN8rmPmjloyZxgyR3GuJ4K0AGtJ2htz8o7yqikm759fldQXaMpbDzjKAG+8v+AugVTOPO5DOjLvGtUYQwh0CPjnVMyGd+8/GfUB5nLKJDD2aLDh5HYyMDJGDwQIo2ZmZcKbowNmAdB/AzyFhrmF2MHRb0QJJfaAnwGB6orZhoykLzJtGwF/xpYxI1dswomiUj3gTuAIqCn/4C7cULwGNBtwMTk3Y4LfKB5YUaOKBKYtpplm7u0vip8tU1NWWyI/7XdcSuIDoMt6rVHMWT0DbjHPGqDqZVSa6zleLcUTcIKLoMv3ueJluALtAo9B302zPPlrtiVScRdCjXvVh3e3JpYa/jjkuC9N+LrBMlz/eAN4eQijX2EdLo6c5tGGHwLyHFtXk89dDGHwCVhG9T0S/j55AhRZgkMCmUQXJ49TnS1wnQDvw0eAh9ICeMmEFbCnPMFzjAvsWoEWEFdYEx+S0MoUZ1gT1wId8+AF3Bl2OoEu906AUHx5VLw/gXYg/x84loOah/2UYNrgiwSwGO7RfUzVBbx/kgpckumGOi6QirtD6gkLTitbnxNol47S2jVc2vsN5kPqaAHT8uUdAJM4v/DanjYOwmUjWznGfwB7sGtAtor5BgofDuzaRj4kSQAqDakTsKORa3Q3xKi3gE1fhl71KRMqrdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg== |
| Subject | Re: XMLHttpRequest |
| Newsgroups | comp.lang.javascript |
| References | <4fb77ae9$0$6925$e4fe514c@news2.news.xs4all.nl> <645cf917-7fb3-4a7b-9e36-8d03aa4ca965@x10g2000yqg.googlegroups.com> <4fba4b92$0$6961$e4fe514c@news2.news.xs4all.nl> |
| Followup-To | comp.lang.javascript |
| MIME-Version | 1.0 |
| Lines | 66 |
| NNTP-Posting-Date | 21 May 2012 18:31:22 CEST |
| NNTP-Posting-Host | 5aeacd86.newsspool4.arcor-online.net |
| X-Trace | DXC=c?J`A?mW^9WYQ5E:l<XC@S4IUK<Cl32<Q4Fo<]lROoRQ8kF<OcfhCO[?F<P;FJ26_RDZm8W4\YJN\UFDj8T]K0?SDmniOZG;K0[e4I4;obY03P |
| X-Complaints-To | usenet-abuse@arcor.de |
| Xref | csiph.com comp.lang.javascript:14054 |
Followups directed to: comp.lang.javascript
Show key headers only | View raw
Tom de Neef wrote:
> "Scott Sauyet" <scott.sauyet@gmail.com> schreef in bericht
> news:645cf917-7fb3-4a7b-9e36-8d03aa4ca965@x10g2000yqg.googlegroups.com...
> Tom de Neef wrote:
>> I found a reference where it says that an open()
>> call will close requests still in progress but I can not find
>> confirmation.
>
> Yes:
>
> | Note: Calling this method an already active request (one for which
> | open() or openRequest()has already been called) is the equivalent
> of
> | calling abort().
> -- Mozilla <https://developer.mozilla.org/en/XMLHttpRequest#open()>
>
> and from the descriptio of the open() algorithm on a XMLHttpRequest
> object:
>
> | 15. Terminate the send() algorithm.
> - W3C <http://www.w3.org/TR/XMLHttpRequest/#the-open-method>
So you have evidence that it might be so in one DOM implementation because
of one Working Draft (or vice-versa). That does not mean anything for the
rest of XHR-supporting runtime environments.
>> I imagine that the script is run in a single thread, so how are
>> successive calls to informServer handled by processAsyncResponse()?
>
> Everything would proceed fine until a second open() call is made when
> the first is processing.
>
> If you want to use a fixed pool of XMLHttpRequest objects (or even
> just one, as you are doing) then you really need to determine if the
> object is in process before you call open() again.
>
> I've never really bothered. Just constructing new instances has not
> caused me noticeable issues.
^^
(sic!)
Of course, creating new objects when not needed will unnecessarily consume
resources that could be more useful elsewhere. And as garbage collection is
not performed instantly (if at all), one should be wary to create new
objects.
> Thank you.
> Note PE's references: there is a limit (of two) to the number of
> XMLHttpRequest objects alive.
No, you misunderstood. I have only pointed out that the number of
simultaneous connections from the same HTTP client to the same HTTP server
or proxy is supposed to be limited. XHR merely provides an interface to the
runtime environment's HTTP client. I think we can accept as an axiom here
that the number of XHR objects that can exist in a program simultaneously is
– just like that of other objects – only limited by the amount of available
memory.
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
XMLHttpRequest "Tom de Neef" <tdeneef@qolor.nl> - 2012-05-19 12:50 +0200
Re: XMLHttpRequest Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-05-20 23:29 +0200
Re: XMLHttpRequest "Tom de Neef" <tdeneef@qolor.nl> - 2012-05-21 09:45 +0200
Re: XMLHttpRequest Scott Sauyet <scott.sauyet@gmail.com> - 2012-05-21 06:26 -0700
Re: XMLHttpRequest "Tom de Neef" <tdeneef@qolor.nl> - 2012-05-21 16:05 +0200
Re: XMLHttpRequest Scott Sauyet <scott.sauyet@gmail.com> - 2012-05-21 09:01 -0700
Re: XMLHttpRequest Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-05-21 18:31 +0200
Re: XMLHttpRequest Scott Sauyet <scott.sauyet@gmail.com> - 2012-05-21 12:42 -0700
csiph-web