I wrote a library to do just this: intercom.js (for the same reasons you outlined).
We're currently using it to broadcast notifications to all windows, so only one window needs to maintain a socket connection to the server. As some others suggested, it uses the localStorage API.
Usage is really simple:
var intercom = Intercom.getInstance();
$('a').on('click', function() {
intercom.emit('notice', {message: 'Something just happened!');
});
To catch the message,
intercom.on('notice', function(notice) {
console.log(notice.message);
});
The interface is designed to mimic socket.io.