Youtube for old x86 machines

Introduce yourself, create test postings or talk nonsense
Post Reply
elcore
Posts: 40
Joined: 4. Jul 2014, 05:07
Location: EU

Youtube for old x86 machines

Post by elcore » 24. Oct 2017, 06:01

Few months ago youtube had shipped new code, resource heavy javascript optimized for modern cpu and touchscreens.
As I continue to maintain a few old machines, I was looking into youtube-dl and squid to maybe find a cure for it.
Turns out there actually is a legacy backend available but it's not so obvious to find, the site supports a wide variety of browsers but most of the time just assumes machine capability based on useragent string.
Problem is that is assumes wrong, when it detects gecko exposed it feeds it thousands lines of javascript for no reason other than the browser supports it so why not.
It stress the cpu, drains battery, fills memory with useless stuff. If the system lacks memory it will swap and slow down to a crawl. My advice is not to expose the useragent string.
I've found a way to access the old backend to watch the tube, works fine on palemoon and seamonkey.

Code: Select all

user_pref("general.useragent.site_specific_overrides", true);
user_pref("general.useragent.override.google.com", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)");
user_pref("general.useragent.override.youtube.com", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)");
user_pref("general.useragent.override.googleapis.com", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)");
user_pref("general.useragent.override.googlevideos.com", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)");
This goes to user.js or prefs.js in browser profile.

(thanks to palemoon and seamonkey devs for support, and google for maintaining the old yt code)

Post Reply