Live data from Hacker News

Please disable JavaScript to view this site

heydonworks.com

151–160 of 281 posts

Re: Please disable JavaScript to view this site

#151

Wow, something is wrong with uMatrix. I have uMatrix with 1st party javascript disabled by default. Yet this site says "Please disable JavaScript to view this site." To be sure, I curled the source and hosted it elsewhere, and my browser (firefox 84.0b4 on linux with uMatrix) still runs the JavaScript.

The JS is inline. Neither uM nor uBO static rules block that. The only way to block it is a uBO dynamic rule `no-scripting: $hostname true`, which you'll also need to be able to render the `` content anyway.

BTW, you probably want to move off of uM given gorhill has abandoned it in favor of uBO. (I converted all my rules to a mix of uBO dynamic rules for JS and static rules for everything else, except for cookies which I still use uM for because uBO can't manage them.)

Re: Please disable JavaScript to view this site

#154

> This website will not [...] tell you fibs That's literally the only thing it did until I reconfigured my browser to access it. It's a misuse of ` ` and it's completely unnecessarily intruding on how I use my own computer to access the content. I thought that was the kind of thing people here (especially the anti-JS people) frown upon.

I’ll add that I’m currently building a website, taking great care that it will be fully operational without JS, and progressively enhance components where there’s some interaction I want to provide to people who accept it. I wholeheartedly agree that there’s way too much JS trash on websites, and that it’s all sorts of vectors for abuse. But this kind of hamfisted response is really painfully unhelpful. You don’t have to browse with JS enabled, and you’re welcome to encourage people to make the web work without it again. But making content inaccessible without finding an obscure browser setting isn’t going to appeal to anyone except the people who are already locked and loaded.

My philosophy is: set a good example, make the benefit clear, and communicate with other devs who might not realize the horror show they’re sending down the wire/executing in their users’ browsers. But forcing people to figure out how to disable something increasingly hard to disable before they can even hear you is not good communication.

I only clicked the link because I was hoping there would be a regular site under default config and some special treat with JS disabled. Progressive enhancement. That would have been a clever and compelling execution.

Re: Please disable JavaScript to view this site

#155
post #99

Earlier quoted context omitted.

I wonder if there's a "please downgrade your browser to view this site" variation...

Please take a seat before clicking this. And yes, it is still actively used by Walgreens. https://webapp.walgreens.com/SupplierNet/login.htm

I can't even load the page because it requires TLS 1.1, heh.

Re: Please disable JavaScript to view this site

#156

I must say, I don't understand the disable JS movement. I browse with JS on, and uBlock Origin to block ads. It's rare that I have any javascript-related problems in my web browsing. On the other hand, I definitely use a number of sites that rely on javascript for useful purposes. If you're worried about tracking, you can block ads and tracking scripts without disabling javascript. If you're worried about viruses, we…

> I don't understand the disable JS movement

Javascript is a privacy and security nightmare. It's almost equivalent to downloading and silently executing untrusted code on your machine. I say "almost" because Javascript code is virtualized and sandboxed. Though I have no doubt people have already discovered vulnerabilities that enable code to break out of the sandbox.

Re: Please disable JavaScript to view this site

#157

I must say, I don't understand the disable JS movement. I browse with JS on, and uBlock Origin to block ads. It's rare that I have any javascript-related problems in my web browsing. On the other hand, I definitely use a number of sites that rely on javascript for useful purposes. If you're worried about tracking, you can block ads and tracking scripts without disabling javascript. If you're worried about viruses, we…

> If you're worried about viruses [...] Not to mention that a host of vulnerabilities were image related a few years back (one of the original rookits exploited a TGA bug). > uBlock Origin Honestly, this is the antivirus of the web. I helped my niece set up my old computer for Minecraft today, and she was explaining how her friend had installed viruses (adware, really) 3 times. Every one of those instances was caused…

In my experience Brave Browser (chrome based) runs circles around uBlock origin FYI

Re: Please disable JavaScript to view this site

#158
post #147

I’d love to get rid of JS for my personal sites, but I know of no clean and simple way to render dynamic content otherwise. Server-side rendering seems a bit messy. I want a clean REST API separate from the UI. How can I generate pages with dynamic content easily? Ideally with absolute minimal dependencies.

Check out next.js. You can write vanilla React basically but fetch the props from an API prior to rendering on the server.

Re: Please disable JavaScript to view this site

#159
post #147

I’d love to get rid of JS for my personal sites, but I know of no clean and simple way to render dynamic content otherwise. Server-side rendering seems a bit messy. I want a clean REST API separate from the UI. How can I generate pages with dynamic content easily? Ideally with absolute minimal dependencies.

A REST API is purely a server-side issue, so you don't need JS for that (unless your server is Node of course).

You still need Ajax (at least) for truly dynamic content. The bad news is that Ajax requires client-side JS. The good news is minimal Ajax functionality only takes about 30 lines of pure Javascript. The bad news is you will need to write those 30 lines yourself because every JS library is at least 100x bigger than that and packed with cruft you don't need.

My advice is to pretend React doesn't exist, learn Javascript, and write just the Javascript you need and no more.

Re: Please disable JavaScript to view this site

#160
post #147

I’d love to get rid of JS for my personal sites, but I know of no clean and simple way to render dynamic content otherwise. Server-side rendering seems a bit messy. I want a clean REST API separate from the UI. How can I generate pages with dynamic content easily? Ideally with absolute minimal dependencies.

[deleted]
Post reply on HN