How to fix browser's memory growth when using periodic AJAX/XMLHttpRequest calls? How to fix browser's memory growth when using periodic AJAX/XMLHttpRequest calls? ajax ajax

How to fix browser's memory growth when using periodic AJAX/XMLHttpRequest calls?


The XmlHttpRequest will cache each response which is why you're appending the date to make the URL unique.

The cache is written to disk as normal, but also will be held in an XmlHttpRequest which has made a request as long as it exists.

You should use an instance per request and destroy it, or otherwise make sure caching is disabled via pragmas and xhr settings.