Hacker News new | ask | show | jobs
by genocidicbunny 1055 days ago
> Are y’all browsing the internet like this? If so how and why?

Yes. All JS turned off by default unless it's on a whitelist. Takes a few days to get the whitelist set up, but its fairly straightforward.

Between this and uBlock, it makes the web a lot safer and resource intensive to browse. For example, people frequently cite Chrome as being faster than Firefox, but with my setup that has rarely been a the case in a very long time.

I've also generally found a strong correlation between websites that don't work or work badly without JS and them being websites I don't want to frequent. And when the website doesn't work without enabling most of the JS, including all the ad and tracking stuff? That's a good sign that I probably should never whitelist that website.

There's also just the matter of principle. If a website works just fine for my needs with most or all of the JS turned off, it wasn't really necessary in the first place was it?

2 comments

I use and recommend the same approach, and add the following trick: some sites will use CSS to hide content until JS runs and twiddles some attribute to un-hide everything. For those sites, disabling CSS will often make the content readable without the need to enable JS. This bookmarklet disables CSS:

  javascript:(function(){ var i,x;for(i=0;x=document.styleSheets[i];++i)x.disabled=true;})();
Hey I just wanted to say this thing is so handy I created an account to thank you. 10/10 lifehack.
Or, in Firefox’s menu bar, simply click “View” → ”Page Style” → “No Style”.
Yes! I forgot to mention, but this is one of the tools I use to check if the CSS is breaking the site.
This doesn't work for anything that runs a `<div id="root" style="display:none">` style hider, and in most cases it messes up the layout completely because it renders all images without explicit height/width attribute at full native resolution.
Great point about inline styles. I've added a bit that removes them anywhere they're present:

  javascript:(function(){document.querySelectorAll("[style]").forEach(function(x){x.style=""});var i,x;for(i=0;x=document.styleSheets[i];++i)x.disabled=true;})();
I would give you two upvotes if I could.
Convincing. Maybe I’ll try it for a while. Any tools you prefer or is it built in to the browser?
NoScript and uBlock Origin are what I use. My two must-have extensions for any browser I regularly use.

With NoScript, I started off with everything blocked, and just stuck the extension icon into the toolbar. Whenever a site wouldn't load properly, I'd temporarily enable the JS just for that single domain, and see if that got it to work. If it didn't, I would usually poke about and see what other domains need to be unblocked. It's pretty common that you might need to unblock some CDN or a 'static' subdomain to get the site to load. If it's a website I expect to come back to, I will then switch those exemptions to permanent, but otherwise I try to avoid leaving a lot of cruft in the whitelist.

Doesn't uBo have an advanced mode that can do it without another extension?
That is entirely possible. I've been using NoScript since it first came out, so that's just more comfortable for me.
In addition to NoScript and uBlock Origin, I'd strongly recommend uMatrix.

uMatrix offers the ability to enable or disable numerous Web capabilities by host or domain.

Capabilities: cookie, css, media, script, XHR,[1] frame, other.

Sites include the page origin, and any other sites and domains from which requests are made. Many common advertising and tracking domains are blacklisted by default.

Rules may be written specific to a site or as default rules.

________________________________

Notes:

1. XMLHttpRequest: <https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequ...>. These permit partial-page updates without a full refresh.

You want uBlock Origin.
And if you use YouTube: sponsorblock