The road to libwww: C as the web's shared tongue

Dennis Ritchie's problem was Unix's software, or more precisely the language it was written in. Most of Unix went down in assembly code, fed in on paper tape: fast and memory-efficient, but laborious and error-prone to produce. His alternative was B, Ken Thompson's interpreted language, which was easier to code in but lacked features Ritchie considered crucial and was too slow for time-sharing environments. So he built neither. He created a compiled language with many of B's features but access to the low-level capabilities of assembly. That language was C.

Unix shipped fully rewritten in C, and the language came bundled with every operating system built on top of it — X-Windows, Linux, Mac OSX among them. It spread because it balanced abstract constructs for predictable software patterns with the ability to get close to the metal. Saron Yitabrek, host of the Command Heroes podcast, calls it "a nearly universal tool for programming; just as capable on a personal computer as it was on a supercomputer." Rob Pike, involved in Unix and later Go, put it more simply: "C is a desert island language." Ritchie himself was fond of remarking that C "has all the elegance and power of assembly language with all the readability and maintainability of… assembly language."

The language became a common tongue for developers, a natural way to bundle up and share code. In 1993, Jean-François Groff and Sir Tim Berners-Lee released just such a bundle — a package usable for building web servers or browsers — called libwww, written in C and placed in the public domain.

Why the first browsers had to be portable

Berners-Lee finished WorldWideWeb, the first browser, at the end of 1990. It ran on his NeXT machine and had read and write capabilities, the latter usable for managing a homepage. He hauled the NeXTcube from conference to conference to demo the web, and after every demo came the same question: how can I start using it? The web is useless isolated on one computer, and he could not lend his machine to everyone.

That task fell to Nicola Pellow, an undergraduate at Leicester Polytechnic still interning at CERN. With no programming background — she studied mathematics — she picked up some C within a couple of months and built the Line Mode Browser. It was text-only, designed to run from a command line terminal: an address brought up a site's text, the up and down arrows navigated, and links appeared as a numbered list you jumped between by entering the right number. That simplicity guaranteed interoperability. For many years it was the only platform-agnostic browser, installable on just about any computer or operating system. Pellow left CERN shortly after releasing it, returned after graduation, and helped build the first Mac browser.

Next came Groff, a programmer of many years working one office over at CERN who had written the French translation of the official C Programming Guide by Brian Kernighan and Ritchie. He immediately understood what the web could be and requested a transfer. He also spotted the chicken-and-egg problem: "to use it, you had to download the software first and install it and possibly compile it." His fix was a telnet mechanism letting anyone in the world browse via the NeXT server's built-in Line Mode Browser — no installation required.

Groff wanted more. Coming from UNIX systems and C, he wanted the web to be a desert island platform, usable in ways its inventors couldn't yet imagine. Working with Berners-Lee, he pulled the essential elements out of the NeXT browser and ported them to C — a choice made both for his own familiarity and because he knew most other programmers shared it. Within a few months he had the libwww package: common components for graphical browsers, including code to parse HTML, process HTTP requests and render pages, plus tools for browser UI, history and graphical window management.

Berners-Lee announced the web to the public on August 7, 1991:

If you're interested in using the code, mail me. It's very prototype, but available by anonymous FTP from info.cern.ch. It's copyright CERN but free distribution and use is not normally a problem.

By November 1992 the library had matured into reusable tools; CERN's public domain terms the following year included it. By 1993, anyone with time and a C compiler could build a browser. Before leaving CERN to become one of the first web consultants, Groff created the www-talk mailing list for the new generation of browser developers.

A one-night hack, built on years of groundwork

On December 13, 1991, Pei-Yuan Wei posted to www-talk about ViolaWWW, built after a conversation with Berners-Lee; within months it was the most popular of the early browsers. In the middle of the post he noted that the build had been a one-night hack. That phrase stuck, and set the tone for a decade of browser development — though the reality was the opposite of what programmers remembered.

Wei, a student at UC Berkeley in the early 90s, was drawn into hypertext by HyperCard, the late-80s Mac application for creating linked stacks of "cards." Stuck on an X-Windows machine that couldn't run HyperCard, he built his own software, starting with a programming language he called Viola; its first product was a HyperCard clone. He saw network access as HyperCard's biggest limitation. Near the end of 1991 he saw a mention of the World Wide Web, combined Viola with libwww, and ported it to read HTML — then a very simple language. Only that final step took a single night.

ViolaWWW became a site of experimentation: the first early stylesheet implementation, bookmarking, forms and embedded media, and downloadable applets that prefigured Java applets. For X-Windows users, it was the most popular browser on the market — until the next thing arrived.

Mosaic: a well-selling pitch and a feedback loop

The New York Times introduced readers to the web on December 8, 1993, opening with "Think of it as a map to the buried treasures of the Information Age." The map it described for half the article was not the web but Mosaic, its most popular browser.

Marc Andreessen was an undergraduate at the University of Illinois working at the university-affiliated National Center for Supercomputing Applications (NCSA), nominally on visualization software he had mostly automated. A colleague introduced him to the web; he downloaded ViolaWWW and, within days, decided both that the web was his focus and that he needed a browser of his own. In 1992 browsers were cumbersome: hard to download and install, often requiring system file modifications, and built by people more focused on the web than on the interface. Andreessen pitched a well-designed, performant, easy-to-install browser that built on Wei's features. "Marc's a very good salesman," programmer Eric Bina later recalled, so he joined.

Their first version, for X Windows, was finished in a few weeks. Andreessen announced it on www-talk: "By the power vested in me by nobody in particular, alpha/beta version 0.5 of NCSA's Motif-based networked information systems and World Wide Web browser, X Mosaic, is hereby released." It was not the best or most advanced browser — it had forms and some media support early on — but it was the easiest to use.

Iteration was the secret weapon. Other NCSA programmers joined, splitting off operating systems to port to; by fall 1993, a few months after release, Mosaic had feature-paired Mac, Windows and Unix versions plus compatible server software. Beta releases came via FTP, sometimes weekly, and the team lived on www-talk, gathering bug reports — a report could come back fixed within hours. Andreessen posted almost daily, polled the list about anonymous usage analytics, and wrote an HTML guide for beginners. When one user said he wasn't a customer, Andreessen replied, "We do care what you think simply because having the wonderful distributed beta team that we essentially have due to this group gives us the opportunity to make our product much better than it could be otherwise."

Internal competition kept the pace up. "We would get together, middle of the night, and come up with some cool idea — images was an example of that — then we would go off and race and see who would do it first," recalled Jon Mittelhauser, who created the Windows version. Features already in ViolaWWW — forms, rich media, bookmarks — were matched or surpassed, and NCSA's own daily-updated "What's New" page greeted users on launch. But the defining feature was the <img> tag. It was added without input from Berners-Lee or the wider community, with Andreessen notifying www-talk only after implementation, sparking conflict with other browser makers. It also made Mosaic far more popular: for a web seen as sterile, rigid and scientific, inline images made browsing compelling, and within months a new class of web designer was experimenting with them.

Press coverage followed in the Times and later in Wired; Mosaic became shorthand for the web itself, as Google is for search now. NCSA, a supercomputing lab rather than a tech company, licensed the software to a dozen or so companies: it went into Spry's Internet in a Box and was embedded in enterprise software by the Santa Cruz Operation. Pressure from management pushed Andreessen out to start a new company, Netscape. Another licensee, Spyglass, began talks with Microsoft. Both would rewrite Mosaic from scratch — each for different reasons, with that browser as the starting point, and both products would shape the browser market for decades.