Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: Which type of network access for this situation? Date: Tue, 18 Apr 2017 00:57:25 +0100 Organization: A noiseless patient Spider Lines: 15 Message-ID: <878tmyoae2.fsf@bsb.me.uk> References: <7e444aec-2938-4da7-9162-54b71bbe7be7@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="467fc7c2187d1c225e36d86117542f4a"; logging-data="27814"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19XOWseHpHsNF06ieGfny2sQa+VObpAUFQ=" Cancel-Lock: sha1:/mLzKh8Pn+bJTcUGq3596Y2WUmA= sha1:uToENLvsIXX2+p46OlmcYki38t8= X-BSB-Auth: 1.82e403a645737c7a5863.20170418005726BST.878tmyoae2.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:33033 bit-naughty@hotmail.com writes: > Suppose after a page is loaded, I want to download some stuff (text or > HTML) later, or even immediately and display it. But NOT on a button > click, more like say, after a timer goes off or something. What type > of networking shit do I use for this? Does it call for AJAX, > WebSockets or the DataChannel part of the WebRTC API, which I just got > to know about? I'm still not really clear about what the exact > differences between each of them are.... If the "stuff" (AKA documents) are available via HTPP (and you can probably arrange that they are), just use XMLHttpRequest. -- Ben.