As with facebook chatbox, when you turn to other facebook page while chatting, your page gets reloaded but chat window maintains state without reloading. How do they manage this?
With AJAX, they don't reload the whole page, just the necessary.
Actually, it's not AJAX, it's called BigPipe.