In previous chapters, you learned how to style layers to compose maps. Then you built a JavaScript code snippet, exploring several possibilities to include maps in your web application.
Whatever technology you prefer, or are constrained to use, you will have to submit a GetMap request to GeoServer. For each request, GeoServer has to perform a complex set of operations--loading data, applying styles, rendering the result to a bitmap, and pushing it back to the client who performed the request. As your web application gains popularity, more and more concurrent requests will hit your server, and you may run out of resources to satisfy them all.
Having to build the map from scratch every time does not make sense, especially if your web application does not offer the user the possibility to modify styles for layers. In many cases, the styles are defined just...