User-agent swap boosts elinks speed

For most of this year I’ve been using elinks as my browser of choice, so long as I wasn’t surfing for something that needed image access specifically — like online shopping, since that makes it difficult to see thumbnails and so forth.

One thing that has always annoyed me has been the seemingly slow rate that elinks brings in some pages, with a long drag that tends to hang the program near the end of loading. It was exceptionally slow on the Pentium, but was only an issue on certain sites — the Ubuntu Forums were rather draggy, but the front page of Wikipedia was terrible. Some of the pages there could take a full minute to complete, which is unthinkable with a text-only browser.

I was willing to suffer through it usually, just because there was no indication elsewhere on the web that anything was wrong. And given that I usually am working on a customized machine in the sub-600Mhz range, I was willing to mentally attribute it to my bad luck or my bad configuration.

Fast-forward to this morning, when I finally got tired of other, unrelated sites blocking page access because elinks has its own user-agent string that it reports. That too is rather rare, but in a case where it keeps me from getting technical information, it’s quite frustrating.

These two issues are related because when I swapped out the user-agent string in Elinks (it’s hiding at Protocols / HTTP / User-agent identification) from its own native

ELinks/%v (textmode; %s; %t-%b)

to the user-agent string for a Linux version of Firefox 3.5.5

Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5

I got a huge speed burst. Wikipedia pages load in a matter of seconds now, and the Ubuntu Forums are also much faster. There is a slight difference in how some information is shown — CSS rollover menus, for example, seem to be spilled off to the left, rather than arranged in a table form as before. That’s going to depend on the site and the code, of course.

But the difference in loading times is remarkable. It also doesn’t hang the application like before, where paging up or down was delayed while elinks waited for the site to supply more information. Bonus.

I’m not sure why the user agent string should make a difference, but tell me if it does the same for you. It’s always possible that I am conveniently imagining things. It wouldn’t be the first time. πŸ™„

7 thoughts on “User-agent swap boosts elinks speed

  1. Sertse

    Another cool feature of using a firefox user agent on elinks is that even site like facebook now work with it.

    Instead of telling you that your browser is incompatible, which would prevent logging in at all, you only get the javascript disabled warning and it works!

    It’s even better using “facebook lite”, since regular facebook depends a lot on javascipt so you can’t do much even when logged in, while lite doesn’t.

    Needless to say, I was quite surprised by that. Social networking in the console πŸ˜‰

    Reply
    1. mulenmar

      I’ve done that before, it’s a cool trick. I don’t understand why the “Javascript disabled” warning would come up in Elinks, though — I thought Elinks used Spidermonkey for that?

      Reply
  2. n2j3

    cheers, nice trick πŸ™‚ in w3m you issue the following

    w3m -o user_agent=”Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5″

    Reply
  3. evidex

    Can I ask, how do you get your elinks to display Ubuntu Forums like is does in your second desktop shot? I’d like to try and wean my older computer off Firefox or Epiphany, but the formatting in elinks is easy to put off someone 😦

    Reply
  4. martintxo

    I have made some test with wikipedia and ubuntuforums, with the standar user agent, whit no user agent, and with the one of this seamonkey browser (Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.8.1.23) Gecko/20090913 SeaMonkey/1.1.18).

    For me the time to load this 2 pages are the same with these user agents:
    http://ubuntuforums.org/: 1-2 sec more or less
    http://es.wikipedia.org/: 8-9 seconds

    This machine: Pentium III at 531.521 Mhz, 500 Mb of RAM.

    Reply

Leave a reply to martintxo Cancel reply