Hacker News new | past | comments | ask | show | jobs | submit login
How and why to use Lynx – the faster web browser (shkspr.mobi)
174 points by edent on Dec 11, 2020 | hide | past | favorite | 74 comments



I believe Lynx does have a vi mode you can enable, though I might be thinking of w3m...

But the killer app for me with web browsers is link hints, like in several browser extensions (e.g. vrome, tridactyl) and in browsers like qutebrowser. It takes a little getting used to at first to use efficiently, but I hate not having it when I use Lynx or w3m.

Slightly apropos, and for what it's worth, I've noticed that 99% of my browsing seems to be or start from maybe 20 or so web sites. I've started creating shell aliases to open those sites and there is no reason not to use the best browser for the site for each one. It works well with a philosophy like seems to be the one behind the surf browser, where you open each thing in its own window and use your window manager to deal with it, instead of using tabs.


Different browsers for different stuff is why I made a 'router' of sorts for my browsers. Hoping to product-ize it someday, but so many browser quirks! (There are actually many of these switchers but none which try to transparently intercept navigation in browser.)


you might like elinks as alternative to lynx, but with link hints.

and those shell aliases sound very similar to surfraw: https://en.wikipedia.org/wiki/Surfraw


As someone who uses Elinks/Links a lot, I'd highly recommend switching out Elinks with Links as the former is a now-deprecated fork of the latter [0][1]

[0] https://en.wikipedia.org/wiki/ELinks#cite_note-2 [1] https://en.wikipedia.org/wiki/Links_(web_browser)#cite_note-...


I'm using felinks https://github.com/rkd77/elinks which recently renamed itself to elinks with the permission of one of the original developers apparently. I can't live without the scripting ability of elinks. https://news.ycombinator.com/item?id=9901932


Elinks contains a SpiderMonkey fork which is unpatched and contains known vulnerabilities.

Quite interesting to read Assange wrote Surfraw in 2000.


I use it regularly, mostly to reading articles on news websites which are getting more and more cluttered with heavy video-based ads and all sorts of garbage.

But I used to use it more often. Some years ago I worked mostly on a terminal window and by using lynx, I could browse the internet while everybody thought I was doing some serious work on the server (folks over there respected people working on black text-based screens)


I still use firefox for that, and just use reader mode. It's easy to toggle on and off, and I can't remember they last time I had an issue with it.


Thanks, I wasn't aware of such mode. I'll check it out


Reader mode in Firefox was a terrific idea and I use it daily. It's "disable images" on steroids. I can't recommend it enough. I do wish there was a simple "disable images" button for other instances when reader mode wasn't available.


The Lynx styles stuff (and the initial cookie jar support) is definitely my most successful bit of code - made in 1996, still cropping up almost 25 years later.


What I miss on lynx is to be able to follow HN's comment layout.


If you ever wondered just how slow modern web development has made the web – Lynx will show you the meaning of haste.

Slow and perhaps also unusable --- such as the popular anti-pattern of requiring JS to render static text, a great example of that being Twitter.


There was a period of time where the web was actually less readable in lynx/elinks, it's weird how that changed.


Maybe during the "flash" era, but as a consistent user of elinks, it has always made the web much more readable to me.


I quit using Lynx (and other text mode browsers) when I started hitting a lot of sites that wouldn't render. This was largely after Flash. I seem to remember JavaScript being a problem. I started using Lynx in the 90's over dialup, telneting into a Unix machine.


Sounds about like my experience too. I used to use it about half of the time up until 2003 or so when I got tired of having to guess how much hassle it was going to be to deal with frames, etc.


Maybe you didn't look too far? By 2003 I was using elinks that had great tables and frames support.


I've been using lynx for almost 3 decades. It was my primary browser for over a decade. The modern web has unfortunately left it behind but it still has utility. I have used it to test accessibility on sites. It is an excellent file manager. Just bookmark ~/ for navigation. It is useful for importing pages with -dump from the command line. It is arguably the best ever gopher client. It is also configurable beyond belief. Hopefully with a resurgence of interest in simplicity and text it will continue to be useful...


> It is useful for importing pages with -dump from the command line.

That's my main use of Lynx these days - for ad-hoc extracting a bunch of links from a page, there's not much easier.


A salute to Lynx, I rely on it every day to cope with `text/html` e-mail in Mutt by virtue of the following line in my `mailcap` that has worked for anything hitting my inbox for about five years now:

    text/html; lynx -width 72 -assume_charset=%{charset} -display_charset=utf-8 -dump %s | sed 's|^   ||'; nametemplate=%s.html; copiousoutput
Trying out the alternatives after reading the other comments here, perhaps I should give `w3m` a shot some day as it renders white space rather pleasantly?


I've noticed that Lynx doesn't like block level elements in links, e.g. <a><figure><img/></figure>...</a>

My blog's homepage is dominated by that construction, so my preferred alternative is w3m.


I hugely prefer w3m's whitespace between paragraphs. Lynx's formatting might be better-suited to 80x24 terminals, but at larger sizes, w3m (or the links/elinks browsers) are much easier reading.

Lynx's keybindings never make sense to me.


I similarly use Lynx alongside Firefox for when I don't want to context switch out of my shell (or am on a headless system).

I've set up various aliases in my dotfile repo that make it easy for me to do search through Lynx to google, ddg, wikipedia etc as well as instantly bring up my most used and read news (and other) sites.

It is really rather handy when you get used to it. But it simply could never replace a modern browser due to the JS dependencies needed.


How does it compare with "links", a more modern implementation of similar type.


Bias disclosure: I have been a links user for over 20 years. It is my primary browser for recreational web use. As an internet user beginning the late 80's, I always tried every linemode or text-only browser I heard about. I think I have possibly used them all. I used lynx through a public access UNIX system for some years. It baffles me when people recommend lynx today. It makes me think they do not actually use a text-only browser much (e.g., once in a while), and that they have not tried them all. To answer your question, the two biggest reasons I would always choose links over lynx is 1. the way links renders tables (this is what initially hoookd me on links) and 2. the source code. I would love to do a side-by-side comparison of text-only browsers. Of course, this is not a topic anyone really cares about. I think links would be the fastest. Funny how he calls anyone who would use a text-only browser exclusively a "masochist". That is how I think of users who use the popular graphical browsers, waiting arbitray amounts of time on every website for pages to "load", making dozens of unnecessary connections to third party servers.


I haven't used Lynx in probably 15 years - this is my first time using it to submit a form, actually. I'm really enjoying it! I spend most of my day in Vim and Tmux otherwise. Thanks for sharing


I MUCH prefer links because it doesn't enforce a mandatory 1-2 second punishment every time there is a warning or message of some sort.


> How does it compare with "links", a more modern implementation of similar type.

I've used both and links is vastly preferable, IMO.

Although I tend to use the name "elinks" since it's much more google-able.


links and elinks are actually two different browsers.

elinks started out as an experimental fork of links but these days they’ve diverged a little. For example, links supports a whole plethora of operating systems, including DOS! While elinks is POSIX only.


Links also has a graphical interface, that displays images. It's still plenty fast. I love how instant web feels through links. It's like 1G fiber connection, 24GB RAM and 8 cores add up to something, but it's just as fast as it was almost 20 years ago, when I used it first time.

One of the projects I intent to one day do is a modern HTML-only browser with tabs, video support and other useful amenities.


Lynx has always been there for me. However nowadays I use 'links'. It has better usability.


Is there a (good) Vim mode to navigate?


I've tried it, I'm not a fan, the web is just too extended to make these sorts of things that useful. I block all JavaScript in my normal browser by default and turn it on selectively for web apps I use (think GitHub and others) but if your site has no interactive element that I care about it stays off. If I click an article and the text doesn't load without JS, I'm sorry but I don't care what you have to say.

I've been messing with Gemini and some of its browsers (I'm a big fan of Lagrange) and I have to say it is spectacular. The markup language for documents is great, the extremely limited functionality is great (although I'd like to see italics and bold text) and I really like the mostly thoughtful content. That latter one would probably change if it picks up a lot of steam, but so far I wish all websites who's audience is just reading were Gemini documents.


Lynx, Links, w3m: all capable user-agents.

I have at various times found myself unable to use a GUI, and these browsers saved my butt finding information to restore my system.

This is why I test all functionality in all three of them and ensure that they are just as able to use the site (or better) as Chrome Canary.


Oh, hello there again! It's always good to see people testing their site on non-mainstream user-agents.

Some other terminal user-agents to try:

rdrview, go-readability: these are CLI utilities that use Mozilla's Readability algorithm to send HTML of just the article to stdout. Pipe that into w3m/lynx/links to read articles in the terminal. Testing in these ensures that your website will work in Firefox's Reader Mode. I also like to diff my website's HTML against the HTML output of these tools, just to see how much extraneous HTML I have.

Mozilla's Readability is written in JS; these tools are written in C and Go, respectively. With the exception of a few whitespace characters, their output of both seems to be identical.

=> https://github.com/eafer/rdrview rdrview

=> https://github.com/go-shiori/go-readability go-readability

Edbrowse is a line-mode browser that supports JavaScript via Duktape. Originally written for blind users, it's great for sighted users as well.

=> https://edbrowse.org/ edbrowse

If you want to go the extra mile and ensure that your website works with the most basic HTML parsers, try sending it through an HTML-to-Markdown converter that doesn't include inline html in the Markdown output. I test with pandoc's strict markdown output and make sure the resulting markdown is readable:

  pandoc -f html -t markdown_strict https://example.com
None of this is a replacement for real a11y testing; most a11y technology leverages mainstream browsers (Chromium, FF, Safari, et cetera).


The article reads much like an 'Ode to Lynx' without providing real reasons on why one should use it.

Yes, you can do some sort of accessibility testing with it (and I'm sure it is an useful tool for a lot more corner cases) but I was expecting a lot more after reading the title


It spesifically says its not for accessibility testing in the article.


I love using Lynx on medium.com. It strips away all the non-content and leaves the good stuff. In fact, I can't browse medium pages using any other browser.


Reader mode Firefox is my tool for that (on mobile too - never "upgraded" to Fenix).

I often open a news page or something and it's completely blank at first because so many scripts and assets got blocked by uMatrix. Before I actually unblock any domains, I try toggling reader mode on - a lot of times it's enough to let me read the plain HTML text which I actually wanted.


Fenix has reader mode now


And the send-to-device feature doesn't crash it anymore!


I also like the fact that you can still send even when the device is turned off.


Oh, that's great to hear! Still not going to upgrade unless some extremely critical vulnerability comes out, though. Tab queue and uMatrix are both killer features for me.


I remember my gentoo days where I had to debug stuff from the console.

Browsing stackoverflow and forums with lynx is possible and saves you in situations when your graphics card drivers fail for some reason.


Does anyone have experience on these text web browser on E-ink readers? I am pretty fed up with many subscription services I use and the inability of using it easily with e-ink readers so far. Their internal browser has always been slow. Maybe a text browser with offline support will be perfect for this scenario. Okay, I just realize there is the terminal for these devices may not be fast anyway, so overall maybe it won't help.


Just disable javascript on any other browser and you will be amazed, how fast it can be. Although, compatibility will vary from site to site.


Lynx works with gopher too.


How does Lynx compare to eww?

I occasionally use eww, though it a bit of unerogonomic pain. Esp without url autocomplete based on browser history.

Though I'm sure I could yak shave that with some elisp if I was motivated enough

(Firefox seems to eat all 8GBs or my RAM lately so it's getting more tempting)


"Firefox seems to eat all 8GBs or my RAM lately so it's getting more tempting"

How many tabs are you opening? I have right here, right now 20 tabs opened in Firefox and Task Manager says my RAM is at 3.7 GB usage. That includes everything, from OS to other background apps that I'm running.


Firefox seems to never return any memory if you close tabs. My workaround for Firefox is using cgroups and limit memory for Firefox there, then it will not swap trash on my 24GB RAM system. Also every couple of weeks I restart it to reclaim the memory, or faster if needed.


Oh this is an interesting workaround. Didn't know you can limit memory to processes. Ubuntu doesn't handle out of memory at all. The whole system just locks up and freezes (at least on 20.04)

Like you say, it doesn't release memory so I need to restart periodically. If I forget then I need to do a hard restart when the system locks up (sometimes loosing work :/)

It seems strange.. it used to handle hundred of open tabs just fine and now it's completely crippled. My guess is that in making the browser faster they cache more and more - and Firefox devs prolly run on fancy machines with tons of RAM.


I think Firefox devs restart it many times a day during development, so they are not as affected. I think with 24GB of RAM I am at least on the edge of tons of memory qualifier and it still seems not enough after few weeks or intensive usage. Nevertheless it's baffling for me not to return the memory, but it's the default with small (roughly less than a page) allocations, because of how brk/sbrk work, Firefox should strive to do better.


I don't know what kind of PC and/or Firefox you have. I just test it by opening 20 more tabs on different heavy image sites (amazon, 9gag, reddit, twitter, instagram), with some having infinite scrolling and scrolled quite long. The memory jumped from 3.7 GB to 4.7 GB then closed them all. Task manager showed me the memory dropped down back to the original 3.7 GB.

I can record a video if you don't believe it.


What OS do you run? I'll try to replicate the issue on my side. I run Linux.


I thought it's obvious is Windows, since I dropped Task Manager as a name there. Or to be absolutely purist, my main OS is Windows under VMWare's hypervisor ESXi, but I have all of them (MacOS, Linux, Android, BSD) as guests on different HDD's/partitions.


Installed it on android termux. Wasn't usable for hn. I like it on Linux and windows.


On hn I prefer gopher://codevoid.de/1/hn. No posting, but I can follow the layout of the threads.


Hacker news loads fine on w3m. w3m keybindings are also much better (vi like).


My site is pretty decent when viewed in Lynx. Except for the "Resume" page title, which looks like garbage because I use accented e characters.

I've started using Lagrange probably more than I ought to lately.


I find lynx really useful for debugging web applications:

PAGER='lynx stdin' perl -d my/dev/server.pl

... hit a breapoint

| p $mech->content # nicely rendered html in the pager


I made some changes to Lynx code to extract relevant information and use it as Web Crawler;


> Set accept_all_cookies=TRUE.

No thanks.


Would be nice to try it if it only ran in a web browser.


Cool, but how do you configure white background?


in /etc/lynx.lss or wherever lynx.lss is installed on your system.


# If you really want the terminal's default colors, and if lynx is built using # ncurses' default-color support, remove these two lines: #normal: normal: lightgray:black #default: normal: white:black


When I see the word ‘blazing’ I cringe. Anyone else?


Lynx isn't the fastest web browser. This is:

'void main() {}'


Text based browser. lol.

I can play full games like krunker.io right now in browser with minimal lag.

I hope all the OS developers are taking note. OS might be just a browser plugin in the future instead of the other way round.

Humans have a brain that soaks new information like a sponge. Internet is the new crack. Having a limited browser is sad.

Edit: ok I tried it. I have to allow 2-3 cookies to run google.com. Facebook doesnot run. I think its a niche thing. Like among peers it would be fun to learn to run and run it but not a stable thing.


> Text based browser. lol.

lol?

> I hope all the OS developers are taking note. OS might be just a browser plugin in the future instead of the other way round.

Maybe the promise of "thin clients" might be realized. Anything is possible.

> Humans have a brain that soaks new information like a sponge.

Where did "Can't teach old dogs new tricks" come from then? Maybe fpr young children, but older people have trouble picking up new technology.

> I think its a niche thing.

I guess you are right - like a sponge.


I think you don't understand the concept of an OS and a browser. If what you say happens, then your idea of a “browser” is actually the OS and the “plugin” is an application.


Bloatware. lol. I just installed this thing on Ubuntu and replied to your comment. lol. Love it! lol.


I just opened up krunker.io in Firefox. lol. They seem to care a lot about my privacy, because the popup said "We care about your privacy". Then I clicked "Show purposes" and it listed ~20 cookies, six of which are "Always active". Ones like "Technically deliver ads or content" which seems super important. lol. I can confirm the popup lag was minimal, I hope krunker.io developers note that. lol.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: