49

Living without the modern browser

 5 years ago
source link: https://www.tuicool.com/articles/hit/myyMRbb
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

7ZbMRj6.png!web

The web can be a resource hog, sometimes devouring CPU and memory. But it doesn’t need to be that way.

Text-based web browsers

It’s often possible to get away with using a text-based browser on the modern web. Websites that tend to work well with text-based browsers include “wiki-sites” (including and especially Wikipedia), blogs, StackOverflow (and family), forums, and really the majority of sites where the main content is text. JavaScript, captchas, and logins, are the main “gotchas” for text-based browsing, if the functionality of a site (or part of the site) relies on any of these then most likely it will not work. For example, I don’t have a problem reading questions and answers on StackOverflow in a text-based browser, but I’m not able to login, answer questions, or read all of the comments.

There are multiple text-based browsers to choose from. The oldest and maybe the most well known is Lynx. Personally I use Links instead, which provides a similar experience, but also includes a “graphical” mode that is capable of displaying images, and the default background color is black as opposed to gray (only for the non-graphical mode, though the background color can be changed in graphical mode). Here’s a list of text-based browsers from Wikipedia (not all of them are maintained).

YouTube through RSS/MPV

I keep up with the channels I subscribe to via RSS. The main downside to this is there is no recommended feed, so I just live without that. You can get the RSS feeds for all of the channels you subscribe to by going to https://www.youtube.com/subscription_manager and clicking “export subscriptions” at the bottom, then just load that into your RSS aggregator. For RSS I use newsboat (terminal-based) and like other RSS aggregators, it supports opening links in an external browser of my choice (relevant later).

For watching the actual YouTube videos, I use MPV, and it’s dead simple. Just run the command “mpv " and it starts playing the YouTube video in a separate window. I want this to be automatic though, so I set MPV to be the default "browser" in my RSS aggregator's settings, so I can open the video with a single keyboard shortcut. But I also use my RSS aggregator for reading too, so I actually set my default browser to [this script](https://gist.github.com/AN3223/decba29be78f5d4f48883d393f340909) which opens YouTube links with MPV and all other links with the Links browser. This script is not useful if you will only use your RSS aggregator for watching YouTube.

I did have an issue with MPV since it loads videos with the best quality possible (i.e. 4k). I only have a 1080p display and my computer has a hard time with higher resolution videos. So I just added the following line to ~/.config/mpv/mpv.conf (if that file doesn’t exist then it’s okay to just start with an empty file):

ytdl-format=bestvideo[height <= 1080]+bestaudio/best

This limits the resolution to 1080p or lower. You can replace “1080” with whatever “max resolution” you’d like to go with.

Twitch through Streamlink/IRC

Streamlink is a CLI program for playing videos fromvarious websites in the media player of your choice (VLC by default). Starting up a stream with it is as simple as “streamlink best" assuming you want the best quality. I wrote a [script](https://gist.github.com/AN3223/d8483fd0307918fb3163e8cc263fbee0) to automate this as well, and it also limits the resolution to 1080p (can be easily changed to a different resolution).

For chatting, it’s fairly trivial to set up an IRC client to connect to Twitch (assuming you already know how to use IRC). Chris Were recently did a great video about this , and you can also follow the instructions in this blog post to set it up.

Podcasts/Music

This type of app is not uncommon so I will keep this brief. I like to use Cantata , it is a light/medium-weight feature rich MPD client that supports podcasts and a handful of other stuff.

Other media

Streamlink has support forother sites as well.

Using modern web browsers anyway

It’s about impossible to avoid using a modern browser, but the experience can be made more bearable. I use Firefox, but most of this will apply to Chrome/Chromium and maybe other browsers too. Probably the most effective thing is going to be an ad blocker. Ads most often contain videos and/or images that waste precious bandwidth and computer resources. I use uBlock Origin, but that’s just preference. JavaScript can also be a leech too, so I use NoScript , though it’s not for the faint of heart. It breaks a lot of sites, so per-site permissions will need to be tinkered with to get sites working. Temporarily disabling NoScript for a specific tab (or for the whole browser) can be useful in a hurry.

This bit is specific to Firefox and I believe it’s meant to become the default in the future. Consider enabling WebRender . This is faster although experimental. The relevant settings can be found in Firefox’s about:config by just searching for “webrender”.

There are also lightweight browsers better suited for the modern web than text-based browsers.

If you know of any other relevant applications, leave a comment on this gist , I would like to compile a proper list. Thank you @[email protected] for telling me about Streamlink.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK