liveBook · Manning

Client

As explained in The Well-Grounded Python Developer: How the pros use Python and Flask

A client is software or a device that sends requests to a server and receives its responses.

When you open a web page, the browser does not already have everything it needs to display it. It acts as a client: an application that uses functionality provided by a server across a network. Desktop and mobile applications can be clients too; multiplayer games, for example, use servers to coordinate players’ actions. section 6.2 section 6.3

A browser builds a page through a series of requests and responses:

  • The browser sends an HTTP request. The server processes it and returns a response, often an HTML page. section 6.2.1
  • The browser renders the HTML. Links in that page can trigger further requests for CSS and JavaScript files. section 6.2.1 section 6.3
  • JavaScript running in the browser can make more HTTP requests to update the page. section 6.3
Figure 6.2 Client and web server interaction event flow to construct a web page

Follow the exchange over time: the client requests a page, receives HTML, and makes additional requests for files needed to render it. section 6.2.1

Each request is a separate exchange, but a session can help the server connect successive requests to the same user. The server creates a session cookie in a response; the browser includes it in later requests. This lets the application maintain information such as a user’s name or shopping cart across requests. The practical distinction is simple: the client requests and presents information, while the server supplies responses and can maintain information associated with the user. section 8.1.1 section 6.2.1

How The Well-Grounded Python Developer: How the pros use Python and Flask covers it

How deep it goes
Explains browser request–response behavior and session cookies, but stops short of a full HTTP protocol treatment.
Examples
Traces a browser requesting HTML and linked files, and mentions social networks and multiplayer games as client applications.
What it assumes
Assumes familiarity with applications and browsers while introducing the client–server model and basic HTTP requests.
What you can do after
Evaluate/understand how a browser obtains and renders server responses and carries session information between requests.
How it connects
Links clients to servers, HTTP, HTML, CSS, JavaScript, and sessions.

Also explained in

Compare how 15 books explain client →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Well-Grounded Python Developer: How the pros use Python and Flask. The section links point to the parts of the book it draws on.