3 ms·
A few months ago I decided to try uMatrix out, which defaults to blocking third-party JS, but allowing first-party JS. It broke a lot of things. But I persevere
by chrismorgan 7y ago
A few months ago I decided to try uMatrix out, which defaults to blocking third-party JS, but allowing first-party JS. It broke a lot of things. But I persevered, and manually whitelisted various things as time went by; I decided to always whitelist by individual third-party for each domain, rather than just throwing in the towel and letting a site do what it wants. Some things were very painful to get working; Dropbox login, which I occasionally need to use for work, was excruciating.
More recently I’ve been playing around with heading in the other direction: when things break, I try blocking first-party JavaScript instead. This has often been successful, so that I’m considering disabling all JS by default and only turning it on when needed.
All this definitely speeds things up. I installed NoScript on my fairly slow phone (Firefox for Android) a month ago, which I don’t use for much, but do a little web reading on sometimes. Disabling JS definitely sped things up a lot.
A few sites do stupid things like visually hiding all content if you don’t have JS. Those I don’t use, use reader mode or once or twice have added a user stylesheet for if I’m going to touch them more than once but decide not to whitelist them for probably capricious reasons.
But this disabling-JS lark is definitely not for the consumer.
- timw4mail 7y agoSites don't "visually hide all content" without JS, they are using JS to render content in the first place, thus no JS, no content.
- codedokode 7y agoNo. Many sites have a style like "display: none" on body element, to hide content until JS is loaded. But of course they have content in HTML for search engines optimization. So they show content to Google robot instantly, but the human user has to wait. Google also uses this trick in search results if I remember correctly.
- chrismorgan 7y agoExactly. Here’s an example I encountered today: https://status.digitalocean.com/ https://status.digitalocean.com/, all the content is in a div that is affected by `.layout-content.status.status-index { opacity: 0 }`. JavaScript code then sets `.style.opacity = 1` on the element to undo that. This is a bad technique. If you really want that effect, something friendlier would be this in the head of the document: <script>document.documentElement.className+=' js'</script> … then prefix that earlier selector with `.js`. Or another approach: remove the `opacity: 0` from the stylesheet, and immediately inside the element to be hidden while loading, add <script>document.currentScript.parentNode.style.opacity=0</script> Remember that external JS is never guaranteed to load; even on normal people’s computers, networks are not reliable and even first-party resources can fail to load, though it’s ones on a different origin that are the least reliable.
- fock 7y agoyeah, on Android Firefox+uBlock is definitely an interesting tradeoff. Without it Firefox is (or I perceive it that way) a lot slower than Chrome - with adblocking things get even. I seriously hope that they dont mess up their new android browser in this regard, I think a faster experience without ads will make a lot of technical chrome users (which supposedly were key to the 70% market penetration it has now) think twice about supporting Google.