What happens inside the browser is real
Even though web applications communicate over a network, developers are shielded from typical network issues such as latency because everything just STOPS while the HTTP requests are travelling, and browsers reassuringly display their spinning circles and ‘Loading’ lines.
A client side application continues to do work while data moves around the network (unless it is a really unresponsive client application!), so you need to develop some awareness of race conditions. There are tools such as jQuery deferreds.
The model as HyperMedia