CERN and the line-mode browser

I remember when Mark took me aside to tell me about the project he was working on with CERN to restore the first ever website to its original URL. Needless to say, I was extremely pleased. After all, cool URIs don’t change.

Then, more recently, Mark told me about a follow-up project they were planning: to recreate the experience of using one of the first web browsers. He asked if I could help organise a hackday-style gathering to accomplish this. I jumped at the chance.

Together with Dan Noyes from the web team at CERN, we assembled a dozen people. Half of them were invited experts and half were chosen from applications. Because I was ostensibly involved in organising the event (although I didn’t really do much), I got a free pass.

And so we gathered in a war-room at CERN on the 18th and 19th of September to hack away at recreating the experience of using the line-mode browser in a modern browser—browserception!

Hacking

Just to be clear, the line-mode browser wasn’t the world’s first web browser. That honour goes to Tim Berners-Lee’s WorldWideWeb programme. But whereas WorldWideWeb only ran on NeXT machines, the line-mode browser worked cross-platform and was, therefore, instrumental in demonstrating the power of the web as a universally-accessible medium.

Just being at CERN was amazing. It’s like double Disneyland for me: not only is it home to the greatest experiment conducted in the history of our species, it’s also the birthplace of the web itself. We all felt quite humbled to be there.

That feeling was amplified when we had a very special guest show up at the start of the event—Robert Cailliau, co-conspirator with Tim Berners-Lee in getting the web off the ground. He gave us a history lesson in the early days of the web; the ideas, the people, and the principles that drove it. At one point, he passed around his notarised copy of the document that put the web into the public domain twenty years ago. “Be careful with that,” he half-joked. “CERN don’t know where their copy is anymore.”

Robert

We had another guest from the early days of the web with us for the duration of our hacking: an IBM RS/6000 machine from the early nineties running the line-mode browser.

Jeremy Brian

I drew on my experience from hack farm and Science Hack Day to get the ball rolling. I was acutely aware that some of us felt pretty unsure about what we could contribute, so I suggested splitting into two teams: one to work on building the line-mode browser simulator, and the other to work on telling the story of its history. That seemed to work out pretty well.

Geeking out Planning Prepping Geeking out

Remy and Brian L. did the really hard work, implementing a simulation of the line-mode browser in Node.js. Lea, Kimberly and John made sure the output looked and felt right. Meanwhile Brian S. had the crazy idea of trying to recreate the font from the IBM machine …by taking a photo of the screen and drawing the glyphs from the photo! Of course Mark jumped on that.

Craig headed up the story-telling side of things with Martin and Angela. My contribution consisted of writing some explanatory words and doing a bit of image optimisation. It would be easy to feel inadequate in the company of such talented developers, but as the hacking went on, it was clear that all those little contributions really add up.

We made a thing

It will probably move from its current URL—line-mode.cern.ch—to a permanent home. In the meantime, why not grab the code and install a copy locally?

  1. Install Node.js.
  2. Clone the github repo to your machine.
  3. Open up the Terminal, navigate to your cloned copy, and type: node .
  4. Open localhost:8000 in a browser.

You can read more about the project but I’m guessing what you’ll really want to do is fire up the line-mode browser. By default it loads a copy of the first ever web page, but you can also navigate other websites by changing this query string:

line-mode.cern.ch/www/proxy?url=http://adactio.com

Or, if you’re running it locally:

localhost:8000/www/proxy?url=http://adactio.com

You can also grab a bookmarklet from the resources page. Drag it to your bookmarks bar, pull up whatever page you want to view, and hit the bookmarklet to see it line-mode style.

dConstruct Huffduffer Adactio Clearleft

All the little details—the font, the animation, the sound—add up to an experience that I find quite immersive. In some ways, it’s a silly little project, but it’s also trying to convey an important message. I really love the final result. I feel incredibly honoured to have been involved—in a small way—in its creation.

Oh, and we also got to go down into the heart of the Large Hadron Collider to see the LHCb experiment. That was, in the truest sense of the word, awesome.

Dan LHCb Amongst the machines LHCb

Responses

Kartik Prabhu

Along with housing the LHC, the most energetic machine (sort of) ever built by humankind, CERN is also the birthplace of the Web 1. Earlier this year, CERN restored the first ever webpage to its original URL 2, and now a great group of web-folk, have rebuilt the first readily available browser called the line-mode browser 3. Jeremy Keith, who worked on the project, has written extensively about it.As one might expect, the line-mode browser, launched in 1993, is very primitive compared to the web browsers of today. It recognises only few HTML tags, no images, video, fancy transitions or javascript. Navigation is entirely keyboard-based, sort of like a command-line. The font is the default monospace available on the computer.Ironically, the creators of this emulation used some pretty shiny new technology like Node.js, canvas and audio elements to make this beautiful window into the web’s past. Actually you can read this article on line-mode!A portal through timeIt is quite amazing that a 20-year old browser, with its now obsolete technology, can read most webpages created today. At the same time, modern web browsers can still read the very first webpage in history. How is this possible?…an important part of the web is the fact that it was released for free into the public domain.—Jeremy KeithThe HTML standard is maintained and developed by W3C, a public community which includes developers and browser-makers. Any recommendation in the HTML standard is, thus, reached by consensus amongst people who use and contribute to the Web.Another aspect is, HTML is designed to fail gracefully. If a browser does not recognise some element then it simply writes out the contents as text, instead of freezing completely 4. Also, if some elements of the markup are considered obsolete, browsers still support them in some way. This approach, makes HTML very flexible and yet quite robust. So even though, HTML and the technology around it evolves, there is never anything that is completely out-of-date and unreadable. The worst possible case, is that you have to read it as text; in fact I am writing this HTML in a text editor right now!Foundation of the webSince the days of line-mode, the Web has acquired many more layers; images, video, scripts and other fancy things to enhance the experience. But line-mode is able to ignore all those additional layers and show you the text content.A couple of times people have tried to replace HTML with these fancier tools. For a few years most websites were made entirely in Flash as animations. In the heyday of the Web 2.0 fad, I was once on a web-team that followed the latest trend and used Javascript to fill up an empty webpage with content. Even at the time, it seemed excessive and bothered me. Now, these experiments have made me realise, we were killing the very essence of what makes the Web so great—HTML and its accessibility!5This project serves as a good reminder that there are people who still have a text-based browsing experience.—Kimberly BlessingNeither Flash nor AJAX generated webpages have the versatility of HTML. These pages are completely inaccessible to older browsers, screen readers, web crawlers, smart-watches, face-glasses, eyeball-computers…What devices will access the Web in the future? 6The best way to build a scalable, accessible web is to base it on HTML for meaningful, semantic content and use other technologies as enhancement layers. If some device can not interpret these fancy things, it can skip directly to the HTML content. This progressive enhancement style, makes the content accessible to everyone, everywhere and ‘everywhen’.HTML is awesomeThe first webpage and line-mode browser experiments have given me a greater appreciation for the beauty and power of HTML. HTML is constantly evolving, and is, I think, immensely underutilised.The web is undeniably one of the most important tools democratizing our ability to take a piece of text — an idea — push it out there…—Craig ModThe Web is the printing press of our times; an amazing piece of technology facilitating a free and wide-scale dissipation of our thoughts and ideas. And all of it is based on this near 20-year old, yet timeless idea of the Hyper Text Markup Language.ReferencesTwenty years of a free, open web at CERN.Restoring the first website at CERN.Line Mode Browser 2013 at CERN.Notes on invalid documents in the HTML4.01 recommendation.on Replacing HTML by Ian Hickson on Google+.This is the web by Brad Frost. All quotes from interviews with the makers of the Line Mode Browser 2013Cover photo: Matrix by elleizarra on Flickr.

Kimberly Blessing

Code Archaeology: Dusting Off the Line Mode Browser

6 min read

The line mode browser (LMB) info page, running on the line mode browser.

It’s been over a month since I returned from my trip to CERN to participate in the line-mode browser hack days and I’m finally getting my photos and my notes in order. If you haven’t read much about the event, Jeremy wrote an excellent summary of the whole experience.

I was on the “coding” team and spent a good deal of time reading through and tracing the logic of the line-mode browser (LMB) source code. It felt like every few minutes I was finding something new or interesting, and pointing it out to the rest of the team, so we could be sure to make note of a feature we needed to implement or something that might be a pitfall. I referred to this work as “code archaeology”. Here are some of my more interesting findings:

  • The earliest style sheet (compiled into the browser) had six styles: normal, list, glossary, monospace, address, and heading. (Heading had a further seven nested styles for TITLE and H1-H6.) What changed with each of these styles? Left indent (two levels), right margin, alignment, capitalize states (two, one for each left indent), double spacing, number of blank lines before and number of blank lines after.
  • There’s code in place to handle H0 as a heading level. It was mapped to the title heading style — so if both TITLE and H0 were present, H0 would overwrite what was shown in the TITLE location (at the top right of the screen (see picture).
  • If you’ve been doing web development for long enough, you’ll probably recall the ISINDEX element — and perhaps, like me, wondered it was supposed to do. If it existed in a page, it added a keyword command to the list of options in the prompt (see picture). It doesn’t look like this feature was fully implemented in the LMB — I don’t see any code that would return a list of pages matching the query. In addition, the LMB only recognized ISINDEX if the opening tag was in all caps.
  • Here’s an HTML element that was new to most of us: LISTING, which is supposed to render plain text. The LMB code we were looking at had a bug, however: only the opening tag was parsed and any closing tag was left to render in the page (see picture).
  • Another element that we’d never heard of before was HP, for highlighted phrase. HP comes from SGML. It had the effect of forcing text into all caps. The LMB that we reviewed parsed and only.
  • Because of the way the LMB parses a document, HTML comments (e.g. ) are ignored — even though there were no comments in any of the early HTML documents we reviewed. In fact, any unknown tag is thrown away as a “junk tag”, yet its contents (what’s between the opening and closing tags) are still rendered to the screen. Thus, a modern web page with a or block would end up showing the user a whole lot of code!

My handwritten notes tracing the logic of the LMB, with Tim Berners-Lee’s original proposal in the background

I’m not sure that we explicitly discussed it, but it soon became clear that we were building a simulator that we expected could render both current web pages as well as the earliest markup found in the first web site. This led to review of some very old markup, written by Tim Berners-Lee himself, and lots of experimentation with the old IBM system we had with us, which was running the LMB. Some more fun discoveries:

  • The HEAD element doesn’t yet appear in HTML — it would have been parsed out as a “junk tag”. That said, in some old HTML documents, you’ll find HEADER tags surrounding the TITLE and NEXTID. Fortunately modern browsers handle this old markup pretty well, so we didn’t have to code anything special for our simulator.
  • These days, we’re used to surrounding paragraphs of text with opening and closing tags… and, back in the day, we just putt hem at the start of paragraphs. Originally

    tags were used as paragraph separators, to create space between paragraphs. This made the work of writing the simulator CSS, to render both old and new code correctly, a little tricky.
  • The LMB indicated a hyperlink by placing a number in brackets following the link text, e.g. [1]. If your link text was more than one word, it might be confusing or hard to determine what text was part of the hyperlink. That said, the list command would show all of the hyperlinks in a document… but it was only helpful if your URLs were descriptive (see picture). The LMB could be started with flags to disable the showing of hyperlinks, which may have been useful when also running in non-interactive mode — perhaps when trying to cat contents to files for storage or printing.

You, too, can get the line-mode browser source code and read through the main file (www.c). See what jumps out at you!

As I’ve expressed before, I’m concerned that many web professionals don’t understand the history of the web and thus are doomed to repeat past mistakes. My biggest hope is that anyone who writes code for the web today will spend just a few minutes using the LMB simulator to browse the first web site as well as to check out their own site — and notice, at the very least, that well-marked up content was and still must be the foundation of the web, in order to have a decent experience, regardless of browser capabilities. Good markup never goes out of style.

Additional references you should check out

Related posts

Web talk

How we built How We Built The World Wide Web In Five Days in more than five days.

Geneva Copenhagen Amsterdam

Telling the origin story of the web.

What a day that was

What a long strange trip it’s been.

T minus one

‘Twas the night before Web@30, and not a particle was stirring, not even a meson.

Back at CERN

Bringing web history alive. Again.

Related links

1990: Programming the World Wide Web – Web Development History

Ah, this brings back memories of hacking on the WorldWideWeb project at CERN!

(Not the original one. I’m not that old. I mean the recreation.)

Tagged with

WWW: Where’s the Writable Web?

Prompted by our time at CERN, Remy ponders why web browsers (quite quickly) diverged from the original vision of being read/write software.

Tagged with

FOREVERYONE.NET

I linked to this a while back but now this great half hour documentary by Jessica Yu is ready and you can watch the whole thing online: Tim Berners-Lee, the birth of the web, and where the web has gone since.

In the scenes describing the early web, there’s footage of the recreated Line Mode Browser—how cool is that‽

Tagged with

The First Web Apps: 5 Apps That Shaped the Internet as We Know It

A great bit of web history spelunking in search of the first websites that allowed users to interact with data on a server. Applications, if you will. It’s well written, but I take issue with this:

The world wide web wasn’t supposed to be this fun. Berners-Lee imagined the internet as a place to collaborate around text, somewhere to share research data and thesis papers.

This often gets trotted out (“the web was intended for scientists sharing documents”), but it’s simply not true that Tim Berners-Lee was only thinking of his immediate use-case; he deliberately made the WWW project broad enough to allow all sorts of thitherto unforeseen uses. If he hadn’t …well, the web wouldn’t have been able to accommodate all those later developments. It’s not an accident that the web was later used for all sorts of unexpected things—that was the whole idea.

Anyway, apart from that misstep, the rest of the article is a fun piece, well worth reading.

Tagged with

Internet and Web Pioneers: Robert Cailliau - YouTube

Once you get past the cheesy intro music, there are some gems from Robert Cailliau in here.

Tagged with

Previously on this day

12 years ago I wrote Rounding up dConstruct 2012

Blog posts and pictures from attendees.

14 years ago I wrote A responsive mind

Responsive web design is about more than just media queries.

15 years ago I wrote PodConstruction

Listen to me natter on about HTML5.