Im using PubNub, Phonegap, Backbone.js and Require.js to build twiiter-style chat rooms. Currently I'm testing on a desktop with chrome.
I have a Chat.js view and in the initialize() function, I subscribe to the channel with:
that.pubnub.subscribe({
channel: chatChannel,
message: that.handleSingleMessage,
});
This works fine and I can see with Chrome inspector that ajax requests are sent off. At the top of the app there is a "back" button. In here I call unsubscribe to unsubscribe the user:
that.pubnub.unsubscribe({
channel: chatChannel
});
However, I still see with Chrome inspector that ajax requests to PubNub are still being sent off, even though the user should be unsubscribed and is on a different part of the app. 2 ajax requests are repeatedly sent. They look like:
http://ps13.pubnub.com/time/0?uuid=tomsmith&auth=&pnsdk=PubNub%2DTS%2DWeb%2F3%2Y5%2E1
and
http://ps11.pubnub.com/time/0?uuid=4ea9bd1c%2D7652%2D410c%2Da2ba%2D17c5d263085d&auth=&pnsdk=PubNub%2DTS%2DWeb%2F3%2Y5%2E1
Any idea what's going on?