Ask HN: What do you think about websites that won't work without JavaScript?

27 points by WildGreenLeave ↗ HN
Personally I prefer websites that work without Javascript, websites that only use HTML/CSS and a regular (PHP/Ruby/Python) backend. Want to use JS? Fine but make sure it also works without. Since a few days I started using VueJS seriously because of a project that has those requirements (mostly an advanced ajax filter) and I like it, but it also got me thinking. Is there any reason to keep maintaining a website for users without Javascript enabled?

tldr; sites that won't work without Javascript enabled, a good thing or a bad thing?

58 comments

[ 2.9 ms ] story [ 110 ms ] thread
If I expect the website to be static (like an article) and it requires javascript, then I just close the tab.

If the website provides dynamic content then it's understandable that js would be required.

I have a bigger problem with sites that won't load because a social media service is blocked. I shouldn't have to enable access for a facebook or twitter button to view your page.
So we built slant.co with the philosophy that all the reading should work ok with JS off, but the contributing systems require JS. The problem is testing, we're a tiny team so I'm not sure the last time we made sure the no js experience works as expected.
This is the trouble with web dev. There are a million factors in play, and it's very tough to create tests for them all, not to mention potentially financially restrictive with the need for multiple browser testing VMs. You have to test cross-browser, make sure all the versions of IE you want to support play nicely with your JavaScript and CSS. The site also needs to be responsive and handle resizing gracefully. Then how about making your site accessible, making sure all the aria tags are where they should be, and that screen readers will read, or not read, your content properly. When there is time to polish, it's often in the form of CSS transitions or animations.

Making my site fallback to no-js gracefully affects so few people, that it falls by the wayside since there's so many other higher priorities that affect a lot more people.

The parent poster is most likely using a strategy to build web sites called “graceful degradation”, where one builds “fallback” code paths for specific scenarios. The result is something that you see on web sites that have a “desktop” (all features) and a “mobile” (not all features) version.

What the parent poster wrote about testing is only true as long as one chooses “graceful degradation” as the strategy to build web sites. Using the alternative strategy “progressive enhancement” means that one does not have to test as much. The reason is that with “progressive enhancement” the more complex functionality of a web site is built on top of the simpler (think “no JS”) layers.

https://en.wikipedia.org/wiki/Graceful_degradation

https://en.wikipedia.org/wiki/Progressive_enhancement

It may seem counterintuitive, but choosing the right approach to build a web site can save a lot of testing effort – and even make sure that a site displays on browsers one did not even consider.

A very easy way to ensure a website works even if not all your assumptions are met (e.g. CSS, JS, fonts are loaded properly) is called “progressive enhancement”: Build the system as good as you can without JS, then add JS on top for the things you can only do with JS. All web sites I created using that technique required minimal testing on systems without JS.

https://en.wikipedia.org/wiki/Progressive_enhancement

It's the somewhat extremist techno boffins who turn off JavaScript - there are so few of them relative to the general Internet audience that IMO the "works without JavaScript" goal is a waste of effort and should be completely ignored.
There are few that turn it off, but many enthusiasts who use ad blockers and ghostery/noscript for security and performance reasons.

If your site needs a half megabyte of JS from six domains to show an article, they've already moved on, boffins or not.

Depends if you want to work as well as you can in google or not - yes they can read some JS but its not perfect - infinite scroll for example
Are those the same guys that do tech support to family/frends/colleagues and install them the latest batch of add/js blockers?
"Works without javascript" also normally means that it works under partial failures, which are a lot more common: an adblocker doesn't like the look of your JS (some people have them configured rather strictly, and false positives happen), a CDN is down, JS doesn't load because the user is on a bad connection... many sites stay sort-of readable even when CSS doesn't make it through, which I really appreciate while travelling.

The more application-like your site is the more leeway it gets in my view. I don't expect Slack or Google Maps to work, but blogs that stay white because jQuery failed to load are really not necessary.

I'd say that my tolerance depends on the kind of project.

Does it do 3D maps? I can understand that the UX will be terrible even with a lot of progressive enhancements. Does it display text (i.e. news sites)? Then it should by all means work without scripting support, and should display images that would usually be lazy-loaded.

I am also willing to compromise on functionality. If a site offers nice, client-side filters for their 100 products, it is OK if they do not work as long as I can [Ctrl]+[F] to find products.

Another thing to consider is that most users who block sites consciously use a plugin that allows unblocking scrips based on the domain (e.g. NoScript, uBlock, uMatrix). Scripts that enable functionality should be hosted on the same TLD or a CDN. I have no mercy if your site depends on various A/B testing and ad tech scripts to work, but I will gladly allow scripts from the origin host, especially if the functionality I gain is explained well.

Do these plugins care if content (images, in particular) loaded by the scripts is hosted on the same TLD?

What do they do about sites that use Google's CDN hosted libraries for things like JQuery? Do they have a whitelist?

I personally think that it's unreasonable to expect websites to work without JavaScript at this point. The "JavaScript disabled" edge case is something I've honestly never even thought about.
I completely disagree. Not only is it a requirement for websites to present the content (if not in a pretty way at least a readable way), it is also practically a requirement for a search engine to index you and it may also be a legal requirement for your support of differently able visitors.

I also have a pet peeve about websites that enforce very small fonts/padding/other things which should be tweakable by user style sheets for improved visibility.

We try to not use Javascript unless we have to. I don't see the point in all this fancy js stuff like smooth scrolling (which usually breaks with swiping back on trackpads).
> Is there any reason to keep maintaining a website for users without Javascript enabled?

The search engine robots. They might be able to crawl your JS site, but I wouldn't bet my business on that.

I have a very low-powered machine and sometimes I use a very lightweight web browser (Dillo), which is amazingly fast.

Your comment makes me think that a lot of the sites I visit with Dillo are accesible for users like us only as second thought or for lazyness.

Could a leap in JS crawling have accesibility as a victim?

I don't think that extracting the text from a JS page is the hard part. Linking it to a page URL is difficult.
The "basic" stuff should work without Javascript, but I don't expect much else.

If you need Javascript to display text on your page there is something seriously wrong with how you program. (And yes, I've seen sites like that.)

If you need Javascript for something as simple as submitting a form, then <shrug>, it doesn't really matter these days.

Just to be precise: If you need Javascript for something as simple as submitting a form, then there is also most likely something seriously wrong with how you program – unless you are using a HTTP method that is not GET or POST.
No, that isn't true.

If your site is AJAX everywhere then adding fallbacks for regular forms is possible, yet a waste of development time. So I don't hold it against developers.

In contrast there is almost never a reason to render text with Javascript (with certain exceptions).

The people whom disable javascript by default actually valuable enough to make the app non javascript?

I haven't seen the recent percent of users that browse the web with javascript turned off but I assume it's really small.

If the site has to be supporting Tor users, well that is one of the times you can't really use javascript.

I'm guilty of not caring about non javascript users and I believe catering for those users is a huge waste of my time.

(comment deleted)
>Personally I prefer websites that work without Javascript, websites that only use HTML/CSS

You need to explain what kind of website you had in mind.

Is it a website that's meant for text content like Wikipedia, The New York Times, or TIAMW[1]? Yes, a lot of technical folks will agree with you that Javascript is unnecessary and is only prevalent to push ads.

Or is your website an "app" like Google maps or the shopping cart checkout page with dynamic elements like recalculating shipping and sales tax when a shopper changes an item quantity? Yes, you can make a "maps" website without javascript (reload every page like the 1990s MapQuest.com). And make web shoppers click the "update cart after quantity change" button so the server sends a brand new webpage (which is very jarring, user hostile, and heavily penalizes mobile phones with slow connections.)

[1]http://motherfuckingwebsite.com/

Usually I think very little about them, since a web site which doesn't work or comes up blank isn't likely to hold my attention for long. I'll whitelist your site if it's something I actually care about using, but if I'm just exploring, I'm more likely to close it and move on.
I don't think this is a question where we can give a universal answer. If you are just publishing content, and JavaScript is not necessary for the core purpose of the page/site, then adding it just for extra flavor is unwise. On the other hand, if your site is a rich SPA, it would be foolish to go back to the days of POSTing data on every click, and reloading an entirely new page with whatever updates the app needs.

There are some pages on my personal web site that are plain HTML/CSS, but I would not think twice about adding JS if I needed it.

Whenever I can, I try to use CSS instead of js. CSS has become really powerful over the last couple of years with better browser support and I prefer it over loading extra javascript. You-dont-need-javascript[1] lists a couple of those great examples. But as other people already said, if the website has to be interactive I use javascript but I try to keep it low and avoid libraries as much as I can (if I am gonna use just one thing out of x amount of others). 2G/FUP etc. are still a thing, unfortunately, and I don't want those users to suffer.

[1] https://github.com/you-dont-need/You-Dont-Need-Javascript

I believe AWS uses/used CSS to animate their admin ui arrow spinners. They use enough CPU to turn the fans on my laptop which rarely turn on under normal circumstances.
This question assumes in the reader a shared understanding and acceptance for what "a website" means and should be. Really, the question is asking, "don't you think the Web should be limited to documents, that apps should be left to app stores?"

I think the Web is, long-term, the only equitable application deployment system. We've seen plenty of examples of the walled garden ecosystems using their control to shut down free speech and criticism. We need a Free, Open Web, one that is as accesible as possible. JavaScript being the only language that runs natively in the browser means that these applications must have JS that works.

The flip side of the coin on a completely open system is that you have to take the bad with the good. That some people are bad developers and make a blog platform into an app or don't have a non-app message for why their game or map rendering engine is not working it's beside the point. People do bad work with every tool. But for some reason, when it's bad from the app store, we blame the developers, but when it's bad in the browser, we blame JS and browser vendors.

I think we are ultimately all doing the best we can. I'd rather a world where people can make mistakes than one that requires permission to release software.

I prefer sites that should work without JavaScript, but I don't always worry about disabling it. There a number of situations where I do appreciate the enhanced experience - image galleries, client-side form validation to reduce server-side errors/warnings (the edits should be both client side and server side, but that's a different conversation), or controls for multimedia come to mind. I get really annoyed by JavaScript powered ads or excessive, bloated libraries downloaded because the developer didn't care.
Pointless JavaScript is a bad thing.

Want to take over the scrolling just because you dislike the default one? Please don't. Also, I believe that by this point the novelty of scroll animations (used to be popular a couple of years ago) has worn off.

Want to include a billion JS tracking services on your mostly-textual webpage? Please, make sure they don't interfere with the rest of the page.

Want to include cool charts, even if they're not interactive? Tables with sortable, re-arrangeable columns? Forms with smart autocomplete that narrows choices based on previous choices? Shopping cart? Chat? Anything that will re-render the entire page for changes on less than 1/2 of the page? Yes, please use JavaScript.

I don't mind websites relying on JavaScript if it would not be feasible to develop them without. However, I frequently come across largely static websites with limited interactivity that require JavaScript, which I tend to consider poor engineering.

I make exceptions for hacks, proof of concepts and the like, but when developing websites professionally, it's a good idea to first build them without JavaScript, then add on whatever JavaScript you feel improves the experience.

For me, the primary concerns are security and trust.

Every sandbox has holes. And the provenance of Javascript on the web is often somewhere between lackadaisical to highly suspect. I wouldn't mind ad-supported content, if the ads were secure, not annoying, and didn't per force track me in ways I don't want.

And there's part of the trust aspect. I expect to know what my browser is doing and what data it's sharing. Current scripting takes that way past my comfort level.

I enable scripting selectively. And if some page/site seems to use it for no other reason than to dump unvetted third-party content on me and to track me, forgetaboutit.

I spend less time on sites that do not work without Javascript - I consider it another barrier towards "not worth it."

I have gotten used to viewing source for those that still pass the threshold. I use NoScript to block Javascript by default, only trusting sites I choose. And that sometimes only fleetingly.

They're by definition incompetently designed, as far as I'm concerned. Obviously this excludes anything which couldn't possibly work without JavaScript, like "Photoshop in your browser" or something. For pages of information, there's no excuse.

I use the Firefox noscript extension by default. If I find some page which doesn't work without JavaScript, more often than not I'll leave it. Sometimes going a step further and actually disabling CSS makes it usable.

The most common irritants nowadays are "single-page web-page viewing web applications", which I want nothing to do with (if you think you can reimplement a web browser's navigation logic as robustly as a web browser does, you're probably wrong; every now and then I have to hard-refresh one of these sites because their navigation process breaks and the "single-page web-page viewing web application" has effectively crashed.)

A particularly bizarre example of a pointless and needlessly JS-requiring single-page web-page viewing web application is certain blogspot.com themes which have become prevalent, so even Google has sunk to this sort of silliness. Bizarrely, these pages are viewable without JavaScript via Google's cache; I have to wonder if Google's cached pages are now some sort of DOM dump (since Googlebot now runs JavaScript), meaning that Google is fixing Google's broken web development practices.

Another irritant is demand-load images. All this means is the page has no images when I view it. It's an inherently broken practice.

Unbelievably, Google's dubious "AMP" project seems to be trying to make people use custom HTML tags to incorporate images, then load them using some AMP-standard approved JavaScript script incorporated in the page. This design is garbage from the very beginning for all of the same reasons.

Progressive optimization is the only sane design. And this isn't just about browsers without JavaScript. Unreliable network connectivity can cause scripts to fail to load, or be delayed. Why make basic functionality of the page reliant on waiting for those scripts to load?

Do what's best for the business.. In an ideal world where everything is free, then yes! make sure you support non-javascript browsers. Otherwise check the market and decide if it's worth the investment.
My preference is sites that don't need large volumes of extra files to download to work, then sites that don't need Javascript, then sites that will degrade gracefully when Javscript is disabled, then sites that don't work without Javascript enabled.

HTML is for content. Javascript is for manipulating content client-side in a way that can't be easily expressed in markup.

What I find more disturbing is the growing tendency to use Javascript as a general hammer for browser frontend, backend and app client. In particular I have a special dislike for electron apps that fulfill functions better suited to native apps, such as terminals and file transfer clients.

I accept that there are many people here who think Javascript is brilliant, but I assure you that while it has it's place, it isn't always the best tool for the job.

It doesn't matter what I think, because the inexorable tide has washed over this question long ago.

Anybody willing to outspend their rivals with enough money to bury the world in obfuscated asynchronous callback hell, just to lock people out of any hope of understanding what their machines are actually doing, did exactly that over the past decade.

I don't like it, but at this point, the precedent is set. The percentage of sites that won't work without it is only going to climb.