> On Oct 21, 2014, at 5:54 PM, Seung Chan Lim <
djs...@gmail.com> wrote:
>
> What I've noticed is that the new changes get appended to the http body. Now I could imagine this could grow quite large at times.
Interesting — that must just be a side effect of the way the XMLHTTPRequest object works.
> Is there any best practice for this?
I don't know. (Maybe JChris does?) You might ask around the CouchDB community, as this is something CouchApps would run into as well.
> I suppose I could periodically disconnect re-establish a new connection (thus freeing up the memory) if I deem the buffer has grown too large, but I wanted to check if there are simpler/smarter ways of dealing with this.
That sounds reasonable. You could also switch to the 'longpoll' feed, which will close the response after sending one update, after which you send another request.
—Jens