Why text-mode browsers still matter

| Comment

The benefits

I’m not going to claim that I do all my browsing in text mode. Most of my time I’m using Mozilla Firefox (although it is configured to block most of the “Web 2.0” annoyances). But not a day pass that I don’t use a text-mode browser as well. I see several benefits in them:

  • Near-instant loading times

This refers both to start-up time and page loading time.

It’s no secret that graphical browsers, even at the best of cases take several seconds to start and become ready to use. In some cases that can be tens of seconds. A text-mode browser is up and running virtually the moment you press Enter. And not just that! You can prime a text-mode browser exactly with the site you want to see. One of my most-typed invocations is elinks dgg.gg/<search_term>, for when I want to look up something I heard in a lecture without distracting myself too much from my noteskeeping (which is already happening in a terminal emulator, so it’s a matter of either a new tab, or backgrounding-foregrounding programs in GNU bash).

Pages load amazingly fast as well, because very few things (aka only the important things) have to be downloaded and rendered. This ties in with the next big benefit:

  • Incredibly bandwidth efficient

I don’t know how Internet is like in other universities, but in mine, we count ourselves lucky if the ping is in the three-digits and the download bandwidth is in the double-digits of KB/s. There’s no way you wouldn’t love text-mode browsers when the WiFi is so terrible.

It also comes handy when you are tethering a 3G connection to get Internet on a computer. Those are metered and quite expensive, so no one likes wasting bandwidth on Web 2.0 bells and whistles. “Modern” websites have become megabytes big, and that’s totally unreasonable.

  • I don’t want to always be charging

For me, knowing that my laptop battery life is so short that I have to carry a charger with me is in itself a problem. I now sometimes have to do it because I switched to a 12-inch ultraportable, but for a long time I used a 10-inch netbook with 6 hours of battery life at its worst. Still today, anything under 4 hours is unacceptable.

I wouldn’t be able to go on for 4+ hours if I used Firefox all the time. Graphical browsers are heavier even when idle, let alone when they have to execute Javascript and download media files and fonts web developers force you to, run background synchronisation and update tasks and so on. Unless it cannot be avoided, I will use text-mode browsing while on battery.

Text-mode browsing prolongs your (battery) life!

  • Do you want to ssh -X firefox to check a webpage from your remote server?

No you don’t. You probably don’t even have any sort of graphical environment on your server, and why would you?

The options

There’s several text-mode browsers, but most of the time I use Elinks. It’s very user-friendly, and exposes its settings nicely as well. It renders most websites well, it can handle authentication and POST requests, and it allows you to download files in case you need to. It’s basically a fully featured browser.

I also keep w3m as a backup option. There’s also lynx but it never agreed with me.

The problems

There’s two problems with text-mode browsing, and both are caused by “modern” approaches to web design. The one is called Javascript (or rather, “Web Applications” and “AJAX”, not JS per se), and the other is prioritising form over function.

Now, full disclosure, I passionately hate Javascript and I believe that the vast majority of the web should be static HTML+CSS documents, with very few exceptions. But some Javascript is not enough to stop elinks. It actually supports it to a great extend, but thankfully it is disabled my default. But there’s websites that even serve everything through Javascript. The Fedora Project sadly has several pages where everything happens in Javascript and their noscript fallback is to show you the YAML file it’s used to generate the page (which is actually better than just a blank page but still).

As for the second problem, that’s something I also only recently started taking seriously. Left on my own devices I would code a website entirely using tables. I was very resistant to using div and bothering to make the web “semantic”. The problems of that attitude become more pronounced when you see a website in text-mode. If you think your website looks beautiful, then also make sure it’s usable when it isn’t rendered pixel-perfect. For example, a newspaper I read subjects me to a several screens long (something like 5 or 6 PageDowns) navigation header on any page (index, category, individual post). In Firefox, the website doesn’t look terrible, but in elinks it’s near-unusable.

PS. Obviously you should have alt-text for any images you put in your website. And don’t use symbol fonts (FontAwesome and whatnot) for navigation elements. Terminals only use one font. They do support Unicode though, and Unicode has navigation symbols.

Category: Software

Tags: Website, Internet, Elinks, w3m, TUI, CLI