Ask HN: Can we just agree on showing HTML without requiring JavaScript?

55 points by damir ↗ HN
I'm browsing with JS and cookies disabled for speed and safety. Lately, more and more simple and plain blogs require JS to show any text on website. Can we just agree on letting basic html do it's thing? Why insist on JS to be able to show simple text on webpage?

For example: https://news.ycombinator.com/item?id=30725933

Go ahead, disable JS and try opening blog on this link. Won't happen...

This page is simple dark text on white background with some images sprinkled in. Why is JS required to show this?

I'm sure I'm not alone in this...

64 comments

[ 2.8 ms ] story [ 28.7 ms ] thread
I use this as a productivity tool: See something interesting on HN, click the link... it's a blank page. Close the page, do something else. Often I remember I'm procrastinating and use it as the bell to get back to working on my side projects.

Even if I'm happily time-wasting - there's a heck of a lot of stuff on the web, no need for dealing with sub-standard websites!

Yeah, I do the same - if it's not a web app but an article, I see no reason to unblock JS just to read it. I believe this is the only way - nobody forces us to read articles blocked by JS, we can just choose not to visit such websites.
I think it should not be an all or nothing proposition. A little js for the right reason can be valuable.

If we could instruct our browsers to use some budget constraints, such as max js size, max number of network requests, and max time, it would force site designers to reign in the unnecessary bulk.

>it would force site designers to reign in the unnecessary bulk.

Many sites are already near unusable on "low-specced" hardware that is used by about 80% of the world population, but most "software engineers" (I'm using that term really loosely here) don't care. My admittedly old but maxed out T440s chokes on twitch.tv. A good chunk of the world population still uses hardware that is considerably worse. It's no wonder that some western sites have problems penetrating other markets - their competition loads in the blink of an eye on my machine, while twitch has trouble even becoming interactive within 5 seconds.

At this point I use underpowered hardware on purpose, because if my T440s can't adequately run our application or the build takes too long, then I know we have a problem.

I really don't expect a page to work perfectly without JS. If some small feature uses it that's perfectly fine. But if I visit a page with JS disabled, I want these features using it to be broken and not the entire page to be unusable...

A little JS for the right reason can be very valuable, but requiring JS just to get a minimally usable page is insane.

Maybe if the kids still remembered how to write html in a text editor without needing frameworks and fucking transpilers and bundlers. My first site was written with Notepad. Back then we just uploaded stuff to the server with FTP and we liked it! :-D
Hello, I probably qualify as one of "the kids" and I use notepad++ (on Windows), nano (on Linux systems without GUI), and featherpad (On my laptop with KDE) to do a bunch of my dev work. I don't tend to use frameworks and I just made some tweaks to my site today specifically to make it look better in Mosaic 2. I don't think I've ever actually used FTP though, my site is on Cloudflare workers cus it's free and doesn't have much downtime, but most of the rest of my stuff is on Github Pages or my VPS (I just edit directly on it when I need to make changes).
Though there are some things you need JS for, mainly cryptography and fun hacky things like this:

  data:text/html,<script>google={visualization:{Query:{setResponse:o=>document.write(atob(o.table.rows.map(e=>e.c[0].v).join("")))}}}</script><script%20src="https://docs.google.com/spreadsheets/d/1SOK9rEPrVLId1NR4KM-mgDO7tlmRk2K5nNi0tv-9gCY/gviz/tq?tqx=out:json"></script>
If you go there, it will allow you to get Tor bridges without sending requests anywhere other than docs.google.com. Useful for getting around Fortinet.
You are an extreme minority, and often any other visitor to a website who "looks like" you are malicious.

Why would anyone invest significant engineering time to placate a userbase that's far far smaller than Internet Explorer 10 usage?

Because it costs more time to not do it. Because seo and all other reasons. I suspect it's rather lack of knowledge than truly a deliberate choice
>seo

Google's crawler uses automated modern Chrome instances. Suggesting SEO isn't possible with JavaScript or can't index a React or Vue website is very, very outdated advice.

> You are an extreme minority, and often any other visitor to a website who "looks like" you are malicious.

Not really, a significant amount of the world browse the internet with a bandwidth marginally better than dial-up. A significant amount of the world browses the internet via something barely passable as a smartphone. A significant amount of the world do not have < 200ms ping.

> Why would anyone invest significant engineering time to placate a userbase that's far far smaller than Internet Explorer 10 usage?

The sort of person that can run a website and use a JS framework should not find static HTML a 'significant' effort. It could most definitely be automated.

Other points:

1. Increase accessibility. JS users will not be affected by not having JS. Your random JS will not always render the same. That CDN you link to might not be accessible everywhere.

2. Decrease bandwidth. Instead of just the content (and a little markup), you now have to load content + JS.

3. Decrease computation. The majority of the world accesses the internet through some device running on a battery. Instead of forcing all of those people to render your site individually, it makes tonnes more sense to render it once on the server end.

But this holds only for static sites. News sites perhaps. Most sites (including this one) have user content. These can't be generated server side. (Partially yes)
This rant was based on the OP's observation that very basic websites require JS to view plain text:

> Lately, more and more simple and plain blogs require JS to show any text on website.

HackerNews can definitely be partially cached, i.e. the front page. But HackerNews is on the other perfectly usable without JS - just because your content is dynamic does not mean it requires JS.

You can even mostly use facebook without JS too: https://mbasic.facebook.com

Nobody expects the full experience, but it should be usable. It doesn't require some insane engineering effort - in fact, the opposite - under-engineer the website!

No, we can't.

We can't agree on your stance, because other people have different stances. You may have some reason why you want JS and cookies disabled, but many people don't. JS has been a part of the internet for as long as I've been alive. Sure, it's being used different and sometimes needlessly as with the blog you noted, but it's here and it's not going anywhere.

If you want the web to be cookieless and JS-less, you can disable them. But the web is not cookieless and JS-less. You get the experience you want. You can't expect everyone to want that experience.

Whatever happened to the notion that web pages should fail gracefully? That is, they should be able to function in the absence of JS and cookies. Perhaps not fully functional or as pretty, but they should work.

I've long considered websites that fail to do this to be poorly engineered.

It went away when not having JS enabled stop being a regular thing ( what, 2010? At the latest!). Before that there were users with very old browsers, or asinine corporate "security" policies that didn't have JS; nowadays it's only luddites longing for HTML-only websites ( we must have lived in different times because those were just terrible to read, especially if you had a nonstandard (for the developer) screen size), aka a negligible amount of internet users. It's a pretty safe bet to not even test what happens when JS is enabled.
Which is very poor engineering.

It also walls an increasing amount of the web off from those of us who reject JS because of the security risks it brings.

The way software development is generally practiced is not "software engineering" but "MVP development", which has nothing to do with anything but getting a piece of the pie. If a particular user doesn't fall into the biggest slice of that pie, the MVP developers don't care.
It walls an increasing amount of the web off from a really small and ever decreasing amount of people.

I'd actually say it's good engineering.

If I engineer a small gas can (for filling my lawn mower) I can build one that holds a gallon, or one that holds 5 gallons. Now 2% of the population that owns lawn mowers have massive yards and riding mowers. So which one do I engineer? Which do I build. I build for the 98%

Optimist says cup is half full

Pessimist says cup is half empty

Engineer says cup is twice the size it has to be.

The reality. Building for the 2% just isn't an effective use of resources.

-- Oh oh.. I got a better one..

-- How many bridges in your home town have allowance for horses. Are all the bridge builders bad engineers?

I politely disagree: today usage of js should be considered criminal not only because of privacy but because of IT {e,in}volution at a whole. In the past all desktop OSes are document-based and work in peer to peer networks (starting from Xerox workstations) since them we only have made crap to copycat those historical systems in buggy, limited and limiting ways just to avoid leaving end users any control of the system they use.

Such move is harmful for the society and must end before it's too late. We must came back to classic desktop computing and punishing all evolution that try to lock users. Modern web(cr)apps fall in this very category.

It's very asinine for instance forcing people's on crappy bloated banking portals instead of agree around a common and standard API (like SEPA OpenBank) leaving users using their favorite local app where all transactions are locally stored, digitally signed by the bank so source of truth in user hand, always available, with as many banks as users want under a common user-chosen UI. No need for crappy monsters WebVM, no need for gazillion of resources just to keep pushing around garbage mostly used for surveillance. The same apply to taxes and pretty anything else.

Personally I like reading post with Firefox reader just to avoid being distracted by the crap added to most websites, if a website does not render in Reader or without js I simply avoid it.

I've always felt that it's easier to handle older browsers with, if JS is an optional feature. Luddites must be the wrong word here, since it's mostly highly technical people that disable JS and cookies, old farts doesn't work either since there are more young people around me that does it.
I suppose that notion went away _because_ of JS and cookies.

Looking at it from a business perspective, it's also a matter of cost. How big a percentage of people have JS off (I searched a bit and everything suggests low single digits, 1-2%), versus how much time do I spend making sure the site is somewhat functional to serve these people. And does somewhat functional make sense? Can they see my site but they can't go into my sales funnel without me making HTML-equivalent pages? In that case why would I bother unless that percentage of users grows to where it becomes financially interesting to me?

Still, would be nice if most sites would at least render some plain HTML fallback with a bit of info, instead of a single line on a white page saying "this doesn't work".

Brave Business that will throw-away X-percentage of prime prospects for potential sales.
2% that costs them 3% to earn is -1% profit.
> I suppose that notion went away _because_ of JS and cookies.

I don't understand what you mean here.

> Looking at it from a business perspective

Which, I suppose, is the underlying problem. In my opinion, the drive to turn websites into revenue generators has had a corrosive effect on the entire web. I suppose that I just have to accept that increasing portions of the web are going to be hostile and to be avoided. It just saddens me, as so much -- perhaps a majority -- of the web is already more of a security risk than I can bear.

> Still, would be nice if most sites would at least render some plain HTML fallback with a bit of info, instead of a single line on a white page saying "this doesn't work".

More info is better than less info, but either way, the page still won't work.

> the drive to turn websites into revenue generators has had a corrosive effect

While I agree, there is the other side of that. They are very very expensive. Even a simple site needs servers, and devs.

> More info is better.

For who? If I tell the 2% of people out there that I sell these awesome things and they attempt to purchase them, but they can't because they have JS off, who did that knowledge help?

Now if it cost me 10k to tell the 2% they're waisting their time here, I'm out 10k and they're no better off than when they got a blank page.

It was a notion I've heard formulated a few times, but who has ever had a product manager who cared about it?

To me, the browser is an application platform. That it originated as a document viewer is historical trivia.

I'm perfectly fine with using cookies and JS, in fact I use them daily in my webapps...

But please, please do render html _without_ requiring JS to do so... That's my main issue - getting blank white page on a simple text based html page like the one mentioned before...

Yeah that's very poor practice. I get why your site may require JS and have nothing for me if I turn it off, but do at least render some fallback with a bit of info so I know what I'm missing, how/where to contact and might be enticed to turn it on again.
Why bother? If a user comes to a page with JS off, they know why they get nothing.
> JS has been a part of the internet for as long as I've been alive.

I think it might be the cause of the problem some of us have with today's bloated Web. Sure, it wasn't ideal and definitely it wasn't pretty, but it was way more usable than today.

(comment deleted)
>No, we can't.

>If you want the web to be cookieless and JS-less

Where did the author explicitly asked for the web to be cookieless and JS-less?

All he asked was for the page to be showing HTML. And furthering inferring, may be pages could use less JS when they not needed?

No, we can't. We can't agree on your stance, because other people have different stances. You may have some reason why you want the blink tag disabled, but many people don't. The blink tag has been a part of the internet for as long as I've been alive. Sure, it's being used different and sometimes needlessly as with the blog you noted, but it's here and it's not going anywhere. If you want the web to be blink tag-less, you can disable it. But the web is not blink tag-less. You get the experience you want. You can't expect everyone to want that experience. /S
> No, we can't.

Well, we can. Some people here have even suggested just _how_ we can, so it's not that we can't. We're just not. You know, for reasons.

> We can't agree on your stance, because other people have different stances.

We can't agree on your stance on racism because other people have different stances.

To put my point less facetiously; opinions aren't the end of a discussion, they're the beginning. Presumably these stances you speak of are based on something. Well okay, this guys stance is based on something too. Discuss the merits of each and you can arrive at one stance that's more correct than the other. Unless of course one of you stops at some point in the discussion and says "Yeah, well, that's just like, your opinion, man".

(comment deleted)
Can we go back to a simpler time when cars weren't media centers?
I absolutely agree. My own personal website have no js, well usable with links, eww, w3m etc BUT most people do not care, for most a Mb+ webpage is nothing strange and they do not care about privacy and safety.

Just try to see how many use a modern WebVM [1] without limiting it's access to system resources (firejail, bubblewrap, capsicum, ...).

[1] those things too many call "browsers" for legacy reasons

The modern HTML spec assumes JS predictability as part of its parsing state machine.
No, that train has left the station. We can’t agree to go back to riding horses to work instead of cars or churning our own butter either.

I have the same reaction you describe — why does a site site use so much Javascript to display a page that could be plain HTML? But try pushing that idea to customers and bosses and their marketing teams and advertisers.

Even sadder is I talk to more and more people calling themselves front-end developers who can’t write plain HTML and CSS and have no clue how HTTP works. For them web front-end means React (or whatever the flavor is this month).

I go further - if you want me to interact with your content regularly, add an RSS feed (or some other notifications system). I will _not_ remember to check your website on a regular basis, no matter how good the content is. Almost all of these JS websites do not have an RSS feed.

This all reminds me of the days when a whole website was an Adobe Flash application. It wasn't good then and it isn't good now.

Agree about RSS as I use it to find all articles. Sites without RSS don’t get remembered. shrug
And if you don't provide a <link> for auto-discovery of the feed my chances of subscribing drop dramatically. Unless I think your content is especially good I'm not hunting around your site to find out where you stuck the tiny RSS logo.
On mobile, in the EU, the Web is unbearable so I mostly use Chrome with JS disabled with very few exceptions.

When I care enough about the content I open the page with either Firefox or DDG.

Then again I know I'm an exception, as I don't socialise or do anything fun online (anymore) or seek for cool stuff - just boring text only articles from HN and news.

(comment deleted)
Yes. If your site requires JS for one of the following things, it is simply broken:

- Video

- Plain-Text

- Images

- Sometimes forms

HTML provides everything you could need in the huge majority of cases.

I would recommend evangelizing and working on HTML-bridges to this:

https://gemini.circumlunar.space/

Asking people to not require javascript is like asking them to not use cell phones: yes, it would probably be better in many ways but it's not happening.

Web sites can function well with both Javascript, and without Javascript. But programmers and companies have to want to do that.

Apple is a good example. It's often accused (especially on HN) of having a web site that is long on flash and short on substance. It's a massive company constantly trying to separate people from their money.

Guess what? apple.com works fine without Javascript.

And it still looks good. Even the pages flogging the latest phones and computers.

Almost any company can do the same. It just takes good managers, and good programmers. But both of those are in short supply these days.

Takes time and dev's aren't cheep. Best coder in the world has to feed their family. Best managers in the world have to feed their coders.

Devs and managers could. But (as a web dev) why bother.

- 1.7 percent of responding households reporting horse ownership (US) - should we call road builders bad at their job because we don't include horse friendly tracks. - Can you imagine a city manager asking for more horse friendly roads in your city? It's 1.7% after all.

Can you imagine a city manager asking for more horse friendly roads in your city?

Perhaps you just have very limited experience, or don't travel, or something, but in the last two major cities (1.5m+) I've lived in, yes, I can imagine that. And in the previous one, horse trials were being added all the time.

We build municipal skateboarding facilities all the time, and in the U.S., only 2% of people are into that. Ditto for frisbee golf, which is only 0.33% of Americans.

More to the point — What you describe is just an excuse for the whole "why bother" laziness and race to the bottom that's gotten the internet into the mess it's in today. "Good enough" almost never is.

Well, that's an individual decision; its free software after all. There is a myriad of devs and more entering the field constantly.

I think it would be easier to invent a new programming language or a browsing engine than having a general consesus on what you are proposing.

Yes please. Browsers need to add much more to CSS to avoid JS for simple things like powerful calc() (with attribute values, more math etc), vertical rhythm and so on.
You can't even buy online without JS because card collection (HTML forms) requires PCI Certification, which is expensive and the majority of merchants can't afford it.
"Can we just agree on letting basic html do it's thing? Why insist on JS to be able to show simple text on webpage?"

Preach it, brotha!

Weird how some giant companies that sell ads for a living invented these JavaScript frameworks that render sites totally unusable when JavaScript is disabled
As I've commented elsewhere, I've found no-JS accessibility (as well as cookie and newsletter modals) to be great gatekeepers for low-quality content.

At some point, I've noticed a strong correlation between low-value content which was a waste of my time to read and these accessibility anti-patterns, so now I just close the tab and read the comments instead.

On the rare occasion I want to access the content despite these roadblocks, I use a proxy service.

- About 2% of users have JS turned off (in the US)

- About 1.7% of people have horses (in the US)

Can we agree it makes as much sense to add horse friendly paths to the side of all the roads in the US, as it does to add JS friendly paths to web sites?

Building a road without a horse track is just bad engineering.
Building a parking lot without a horse pole and water pale. Is silly. It's rejecting X percent of your clients.
Building a road without a horse track is bad management and the engineers are lazy.
Roads should fail gracefully. Allow those without cars to ride horses.