简体   繁体   中英

AJAX Requests memory leak

I am working on some Ajax for a page that polls a app. The app returns a JSON string and the browsers parses it and hands it off to the screen.

As this polling takes place every 500 milliseconds (arbitrary) I notice that the response is coming back to the browser and being added to the resources section of the browser - see attachment 在此处输入图片说明 . My question then is "Is this normal for every response to mount up"? If this app is left for 20 mins that is a hell of a lot of built up items...

What you are seeing is an artifact of having the debugger open. When it's open, it saves lots of information about what is going on. When the debugger is not open, it is not saving anything.

Ajax results should not accumulate on their own if the debugger is not open.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM