Modern web applications, as a rule, generate HTML on the client (browser) using libraries such as Angular. Thus, the server does not serve HTML, rather, it serves the web application (static files) for the client and provides an API for calling the client. The client retrieves data from the server API and displays the HTML.
Since an API component is required for a consumer application, it must have a low latency connection.
Since the API serves clean data (JSON, CSV, etc.) and does not display HTML, this leads to the fact that less data is transferred to the wire between the client and server. It also shrinks better.
source
share