Readit News logoReadit News
Kwpolska · 2 years ago
> Does the corporate firewall block JavaScript? Because loads of them still do.

[citation needed]

> Does their ISP or mobile operator interfere with downloaded JavaScript? Sky accidentally block jQuery, Comcast insert ads into your script, and if you've never experienced this before, drive to an airport and use their wifi.

Ever heard of HTTPS?

> Do they have addons or plugins installed which inject script or alter the DOM in ways you didn't anticipate? There are thousands of browser extensions. Are you sure none interfere with your JS?

If the user installs an extension that breaks the web, it’s the user’s fault, and the developers should not cater to them.

muxator · 2 years ago
> if the user installs an extension that breaks the web

It does not break the web. It may break single sites that were written on naive assumptions; I see a lot of sites break because my extensions do not allow loading analytics libraries. This means their js was dependent on this libraries being actually active.

I'd say this is case a case of _unbreaking_ the web.

bryanrasmussen · 2 years ago
>It may break single sites that were written on naive assumptions; Google Translate and many other libraries break React based sites if they are using refs.

I don't think that point it falls under "written on naive assumptions"

https://github.com/facebook/react/issues/11538

the issue says closed but you can easily catch it in various sites and use cases.

sccxy · 2 years ago
Still user decides to use crappy extension to break websites.

Some users send me email that they cannot see images on my website. They have adblocker rule where they block all images which contain ad.

So dsa231dfsaade.jpg is blocked. And you say that is website developers fault?

Deleted Comment

karma_pharmer · 2 years ago
Ever heard of HTTPS?

Ever heard of SSL MITM Proxy? Required by law (and corporate compliance departments) in many industries.

Also, cloudflare. They are the MITM for what, like 80% of the internet now?

Kwpolska · 2 years ago
Cloudflare may be MITM, but with the consent of the website owner. If they break JS (which I doubt they would), the website owner would certainly notice.

Police states and "internet security" mal^H^H^Hsoftware may MITM stuff. If you're actually doing business with customers in those police states, you probably have someone local who can test. "Internet security" software is unlikely to break things just to insert ads (as the ISP mentioned in the post did over plain HTTP).

apienx · 2 years ago
> Required by law (and corporate compliance departments) in many industries.

Could you please provide details about this?

red_admiral · 2 years ago
Cloudflare does not fiddle with or inject JS without the server's consent. They're not comcast.
zarzavat · 2 years ago
This doesn’t work unless you have access to the device, which mobile ISPs surely don’t. Some countries might mandate it but I don’t think it’s a feature to make your websites police state approved.

Deleted Comment

sccxy · 2 years ago
> Also, cloudflare. They are the MITM for what, like 80% of the internet now?

Please give source for that claim where Cloudflare implements man-in-the-middle attack.

rasso · 2 years ago
So, you have found three points that might not apply. Does that make the point of the article invalid? I think it doesn‘t.
Kwpolska · 2 years ago
Those are the three arguments I find the least believable. Other arguments are also questionable in 2024. 2G networks are not really usable for Internet consumption. Outages or failures happen, but they can happen for a HTML-only page. Pages where the primary goal is content consumption should use progressive enhancement and limited scripting, but it doesn’t really make much sense for applications.
6510 · 2 years ago
It could be interesting to explore how things fail. If it is supper easy to fix ill do it.
lelanthran · 2 years ago
Yeah, agreed. The general tone of the flowchart is misleading: tons of paths lead to "cannot use javascript" and only one leads to "can use javascript" creates the misleading implication that the probability of the user having JS is low and the reverse probability is high.

The articles point seems to be: if you're writing a webapp or anything interactive, then a mere 99.999% of visitors will be able to use the content.

blowski · 2 years ago
This whole topic is as interesting as "tabs vs spaces" or "emacs vs vim". There's a vocal minority of people that want to tell everybody else how the web should work, and everybody has ignored them for the last 20 years, and will continue to ignore them.
hilbert42 · 2 years ago
"If the user installs an extension that breaks the web, it’s the user’s fault, and the developers should not cater to them."

Likely so. My normal default is to browse the Web without JavaScript enabled, I've worked the Web this way since the 1990s. The reasons are:

(a) The web runs just so much faster without JS, also those jitters, pauses and delays caused by JS simply disappear. If people knew how much faster the non-JS mode actually is then many more would partake of it.

(b) These days, many web pages are enormous, it's not unusual to see pages that are over 7 or 8MB in size, they're so slow that one can just about have a coffee break before they load. Disable JS in one of these pages and its content can be well in excess of an order of magnitude smaller.

(c) Without JS, ads are almost a thing of the past. I don't bother to run ad-blockers simply because I don't have to. Without JS ads simply don't download.

(d) Without JS much of the online spying and tracking simply disappears. Those who want to track users can't help themselves from using JS (it seems to go with the territory).

(e) Without JS, annoying audio and videos don't start automatically. That's good because if I want to watch the content I can just copy its link to say NewPipe and have a much more pleasant experience.

(f) Without JS, pop-ups and messages such as those that ask for permission to accept cookies don't appear, similarly so for those asking for donations. Many web operators wait for a few seconds before displaying these messages, by that time one's already reading page content so the message is aimed to deliberately distract the viewer. Notable offenders are the Guardian and Wiki especially during its money drives, but there are thousands more just like them.

(g) Web browsing sans JS is more secure, there's less chance of receiving nefarious scripts etc.

It's not JavaScript that's the problem, rather it is web developers who actually abuse it to end users' considerable disadvantage. Turning off JS is my attempt to level the playing field.

People ask how I manage with sites that have key functions that require JS to work and without which the sites are useless. Several answers: first, sometimes I do have to turn on JS but it's certainly more the exception than the rule. To turn JS on/off I just hit a toggle button on the browser that invokes say the QuickJava add-on (and I never bother using 'cantankerous' browsers such as Chrome, Edge, etc.).

Second, when I come across a website that only displays a blank page if JS is disabled and or requires JS for some key function to work then I simply move onto somewhere else! If any web developers who adopt such practices are reading this then let me tell you categorically that there's nothing else that will get me off that site faster than that, in a sub-second I'm out of there. QED!

Third, people say I'm missing out on many web enhancements by turning off JS. Often that's true but in most instances I just do not want them. I find most pages that use these visual enhancements distracting and or outright annoying. When I read a book I do not expect everything on the page to be continually popping in and out, same goes for webpages. What's nice about HN's website is that its pages are static and they carry no superfluous junk. That's how I like it. In my opinion prerequisite training for web developers ought to be a compulsory course on human ergonomics (they'd then perhaps better understand what Web surfers actually want to view and then design their pages accordingly).

Finally, I'd add that I've noticed repeatedly over the years that websites with the largest size pages and those which include the most superfluous amount of junk are also the sites whose content I find least interesting. The fact is there's just so much content on the web that if 99% of websites were of the type that I've no interest in visiting then I still wouldn't have time to visit all the others in my lifetime (I can afford to be very choosy).

In essence, on the Web it's easy to set one's own rules and be choosy about what one views. And I'm sure the reason for why not more act as I do is that many have been forced into using the narrow webcasting as offered by the big internet giants. They of course all require surfers to have JavaScript enabled.

7bit · 2 years ago
I feel like the author is stuck in the 2000's where JS should indeed only support the browsing experience. But we're in 2024 we're JS has reached almost the same level of support in every major browser.

Many of the arguments are just plain stupid. The JS hasn't loaded yet? So what about images? If your HTML document loads, your JS will too. If you're unsure about that, don't load from sources you don't control.

And if a MITM injects code into your JS, then they inject that into your HTML as well...

Dalewyn · 2 years ago
>The JS hasn't loaded yet?

My dad is an avid reader of news articles on his iPhone. That's mostly text with some photos here and there, ostensibly anyway.

Whenever I happen to see how much traffic he downloads over the better part of a working day, somehow he racks up almost if not over a gigabyte. And that's with iOS set to data saving mode.

1GB. For what should be mostly textual and static image content. What the sincere fuck?

The only reason people need phone data plans with sky high data speeds and caps, aside from streaming, is because malvertisements and JavaShit waste away most of it. This is fucking cancer.

echoangle · 2 years ago
There’s no way even 10% of this is due to JS. It’s probably mostly images and videos which make up this data usage.
8organicbits · 2 years ago
If you only use JS for progressive enhancement or optional features, you don't need to worry if your user has JS or not.

Most websites are inherently text, most interactions are form-like. Unless the website is a web application, which does complex and dynamic things, JS seems like it makes websites worse. JS riddled sites are slow, have poor usability, and often are over-animated to the point of visual distraction.

guidopallemans · 2 years ago
> most interactions are form-like

I'd say that most interactions are link-like, but that proves your point even further.

porcoda · 2 years ago
JS is both the best and worst thing to have happened to computing in the last decades. Great creations based on it, but I constantly feel that dev community comes from a completely different planet than me when it comes to thinking about quality, resources, and priorities. I often feel that the greater JS community does more harm than good when it comes to what can be built atop that ecosystem.
63stack · 2 years ago
I have seen so many of these "you shouldn't do this completely normal, accepted and usual thing in $current_year because of corner case XYZ", but who is the target audience?

As a developer, I don't have the authority to decide I'm going to spend resources on making the site work without javascript. I can sneak in some extra hours, but continuously testing if the site works without it, and getting other developers to do the same is not a small task.

Managers? They are not going to read this.

andrewstuart · 2 years ago
There are lots of people in the world and some of them have unusual perspectives on how the world should work.
nonrandomstring · 2 years ago
I did a double-take because there's two ways to read that. We have an unusual, thin slice of humanity here on HN, a minority with disproportionate power to impose its will upon billions while calling others with different lifestyles "marginal", "edge cases", and so on.
tisc · 2 years ago
> Have they switched of JavaScript? Because people still do.

As an experiment I tend to disable JavaScript periodically. It is amazing how fast and responsive applications become. The amount of cruft that is downloaded is insane! Typically my experiments end after a month or so, because a lot of website don’t work _at all_ with JavaScript disabled.

dfawcus · 2 years ago
I generally browse with JS disabled, most things I read "just work".

To achieve this I make use of uMatrix, with the global default being JS disabled, and CSS disabled. Then for sites where I consider it worth the cost, and value the content, I selectively enable JS.

Now one other reason I could give for why not JS would be screen readers, I imagine in content does not render without JS being active, those readers may well be rendered inoperative. Or at best very poor to interact with.

andrewstuart · 2 years ago
I feel like this is trying to convince me to support clients without javascript.

The answer is no. Absolutely not.

If you do not have javascript then I don’t want you as a user. I don’t care why. Javascript or no service.

sccxy · 2 years ago
I have some pretty popular personal web app and I still get angry e-mails from people using Windows XP that my site is broken and I am terrible developer for making broken websites.

I wonder how they even manage to browse web daily. Or they have to send daily hate mail for developers...

andrewstuart · 2 years ago
I'll support latest version minus one of major browsers.

That's all I'll support - if any user has a problem because they are on an old version, they should use some other website instead of mine.

Lack of JavaScript or latest web browser is a user problem.

panny · 2 years ago
I make these talking points because I hate javascript as a developer. I won't ever bother listing all the reasons why, because they are so well known. I'll actively repeat these points ad nauseum in every meeting if you have this attitude with me on the team. To me, JS is a terrible language to work with, but I will make it about the user. You will lose this argument with the boss, because he doesn't care about languages, he cares about more users. So you can fold your arms and pout about it like this, and I will still win. Most of my apps work without JS and when someone tries to introduce a JS only feature, I make their lives miserable with the boss until they give up or quit their job.
em-bee · 2 years ago
so what are these arguments in favor of the user?

as a user i like websites that are interactive and fast to respond. from my experience that works better if the site is done in a frontend framework and built to reduce roundtrips to the server.

i am on a slow connection, and when on hackernews for example on a slow day half the time the pages don't even load. so i sit there wanting to reply to a comment and i can't because first the reply link fails, and when it finally loads, submit fails.

had hackernews been written with a frontend framework, then i could click reply and submit without internet access, and the page could store my comment until internet is back and send it without me having to babysit it.

even just plain reading would would be better. with js new comments could be loaded in the background and they could be added to the page and marked as new without reloading the whole page. a much smoother experience than having to wait for a reload.

i don't know what kind of sites you are building. maybe in your domain this kind of example doesn't apply, but claiming that javascript is bad for users across the board is just plain nonsense. most users do not care whether something is done in js or not. they care that it functions well, and there are cases where javascript provides the better functionality. (submitting this comment took 1.3 seconds + another 300ms to load the updated page. and that's fast. with js it could happen in the background.)

kstrauser · 2 years ago
I’m with you. On the Internet today, a web browser is a thing that runs JS. Clients without it are HTTP browsers. Given that no browser maker has shipped that as a default config in what, like 20 years?, that ship has sailed.

JS came out a year before CSS for Pete’s sake. It just turned 28. It’s finishing its residency and can rent cars. I get why people didn’t like it nearly 30 years ago. I didn’t because it didn’t run well on the Amiga I had back then. But complaining about it today makes me imagine someone complaining about “why don’t these so-called ‘web’ sites gracefully fall back to table layout for those of us who can’t or won’t use CSS?” I understand the fundamental difference. I just don’t think it matters anymore.

eviks · 2 years ago
If you understand the fundamental difference, why are you using CSS as a comparison?
agile-gift0262 · 2 years ago
I don't understand. Why not build most of the functionality in HTML + CSS and use JavaScript only for interactivity and "real time"?

Hacker News is a very good example of that done right. I have JavaScript disabled and I can use the site just fine. The only thing I can't do is collapse comment threads.

TheCleric · 2 years ago
Because this closes you off from being able to use a whole suite of development options (such as front end JS frameworks).
geuis · 2 years ago
> People still do.

Links to an 11 year old article.

agile-gift0262 · 2 years ago
I still do. In fact, hello from a browser with JavaScript disabled
nxobject · 2 years ago
In the article's defence, it _was_ written around early 2015. [1]

[1] https://web.archive.org/web/20240000000000*/https://www.kryo...