Just diving into the world of Javascript, I stumbled upon an intriguing article that discussed the concept of reusing an ajax connection multiple times. The article gave an example:
"You can define an ajax connection once, and reuse it multiple times, starting and stopping it later on."
var myAjaxRequest = A.io.request('test.html', {
method: 'POST',
data: {
key1: 'value1'
}
});
The article then goes on to explain how the same ajax call can be made again simply by calling:
myAjaxRequest.start();
This got me thinking - what if I had a heavily trafficked auction page where users are constantly interacting with their browsers. Would the myAjaxRequest connection persist through all these interactions? I assume it gets destroyed on page refresh, but are there other factors that may cause its destruction? For instance, let's say the object is created within a YUI sandbox environment.