Skip to content
FrontDepth, Home

1991 – today

Static HTML and server rendering

The server builds every page. Each click or form sends a request, and a whole new page comes back.

JuniorRuns on: plain browser APIs, no library

The problem

Researchers needed to share documents that link to each other across computers and networks. HTML described a page, HTTP fetched it, and a URL named it. Soon pages had to show data that changes (search results, orders, a list of todos), so programs on the server started writing the HTML for each request.

The idea

The browser is a document viewer. A link is a GET request; a form is a POST with the fields of the form. The server reads the request, changes its data, writes a whole HTML page and sends it back. The browser throws the old page away and shows the new one.

All the logic and all the state live on the server: here server.js keeps the list and renderPage() writes the HTML for every request. The filter travels in the URL (/?filter=active) and in hidden form fields.

What hurt next

Every change, even ticking one checkbox, is a round trip to the server and a new page: the screen flashes, the scroll position and anything half-typed are lost, and the user waits for the network each time. Pages could not react to the user on their own. JavaScript (1995) and Dynamic HTML let the page change itself in the browser.

Next era: Dynamic HTML and the browser wars

How close this is to the original

The pattern is the original one, written in today's JavaScript instead of Perl or C. The server runs in the same page as the app, and a full page load is imitated by replacing the body.

The todo app in this era