The client and the server communicate many times and in different ways.
The first instance of communication occurs when the code that executes on the client machine has to be sent. We mentioned earlier that one of the advantages of using the web as opposed to native apps is that we would not have to install them all the time. As it turns out, this comes with some trade-offs as well, because every time we visit a website, we have to download all of its layout and code. Most commonly, this is in the form of HTML (for layout), CSS (for style), and JavaScript (for functionality).
The preceding figure shows the simplest ...