Interesting video about how the data transfer between client and server can work out .
Skip to 1:15 and the explanation at 2:50.