Ask HN: What do you think about websites that won't work without JavaScript?
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 ] threadIf the website provides dynamic content then it's understandable that js would be required.
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.
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.
https://en.wikipedia.org/wiki/Progressive_enhancement
If your site needs a half megabyte of JS from six domains to show an article, they've already moved on, boffins or not.
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.
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.
What do they do about sites that use Google's CDN hosted libraries for things like JQuery? Do they have a whitelist?
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.
The search engine robots. They might be able to crawl your JS site, but I wouldn't bet my business on that.
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?
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.
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).
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.
Do read past the short answer of 1.1% though.
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/
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.
[1] https://github.com/you-dont-need/You-Dont-Need-Javascript
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.
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 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.
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 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.
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?
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.
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.