Is XMLHttpRequest() object garbage collected?

Discussing Html . Code , Software , other

Moderators: egami, macek, gesf

Post Reply
Misulache12
New php-forum User
New php-forum User
Posts: 8
Joined: Wed Jan 28, 2015 2:16 am

Thu Jan 29, 2015 3:44 am

To obtain some data from a PHP server I created a new XMLHttpRequest() object then I used its methods open() and send(). Searching forward on w3.org site I understood that this object is not automatically subjected to garbage collection process. On the other hand I've seen a lot of examples on how to create an XMPHttpRequest() object and none for destroy it. I have or I have not to terminate myself this object?

johnmacd
New php-forum User
New php-forum User
Posts: 72
Joined: Wed Jun 12, 2013 9:30 pm
Contact:

Thu Apr 07, 2016 3:39 am

Hi,


If an XMLHttpRequest t object must not be garbage collected if its state is either opened with the send () flag set, headers received, or loading.
If an XMLHttpRequest object is garbage collected while its connection is open, the user agent must terminate the request.

Thanks

Post Reply