Live data from Hacker News

Your website should work without JavaScript (2021)

endtimes.dev

61–70 of 159 posts

Re: Your website should work without JavaScript (2021)

#61
Purists who refuse to load websites with JS are such a small percentage of visitors they can be safely ignored. It's an uphill battle that they're losing very fast. I don't think you can use more than 5% of websites without JS in any capacity.

The whole point of websites is lost if they can't track visitors, see what they're paying attention to, and how to manipulate their behavior. Everyone's doing it, and if you don't, you're at a disadvantage. There are very few websites whose purpose is not to influence you to spend money on something. Most of the articles and posts you read are AI generated, or written by "content writers" never intended to be read by actual people, they're there for the google bot to keep some activity going.

Re: Your website should work without JavaScript (2021)

#62
post #61

Purists who refuse to load websites with JS are such a small percentage of visitors they can be safely ignored. It's an uphill battle that they're losing very fast. I don't think you can use more than 5% of websites without JS in any capacity. The whole point of websites is lost if they can't track visitors, see what they're paying attention to, and how to manipulate their behavior. Everyone's doing it, and if you do…

As a practising JavaScript-decliner for a few years: your “only 5% work” figure is wildly, extremely wrong. It depends a little on what types of sites you’re dealing with, but for contenty sites rather than appy sites, I’d put it past 95%, with a few notable major site exceptions (so that by content it may well be below 95%) and certain subcategories that are more commonly broken.

And I’d say the battle has actually gained some ground in the last eight years, as server-side rendering of JavaScript content stacks has made headway.

Re: Your website should work without JavaScript (2021)

#63

I read HN a lot, this topic always comes up so I said “I’m going to build a site that makes these readers happy. Take all their advice, no JS at all. Everything done in HTML. Everything they’re asking for” Turns out the hardest thing to do is to get people to use your site.

> Take all their advice

This site is horrible to take advice from. I would sooner ask why other people are doing things in a given way before trusting the HN hivemind to give advice on how to build a successful product.

Re: Your website should work without JavaScript (2021)

#64

I don't care so much when a site with lots of interactivity requires JavaScript, but holy heck, do few things piss me off more than a blog site with articles that require JavaScript just to read text! Whomever writes web software to do that should be ashamed of themselves. If it's really that hard for you to prerender a page on the server, then just send the text by itself. Can you do that? I don't need you to preren…

Just out of curiosity - why is this such a big deal? Personally, as long as the page has a good UI, I couldn't care less if it is being prerendered or not.

Re: Your website should work without JavaScript (2021)

#65
Your mobile website certainly should require as little javascript as possible. You don't know what app the user is running in the background on what phone, so your tests on high end devices do not represent the experience of your visitors. There is no need for these drawer menus (often slow) or complex interactive filters that need 50 AJAX calls. Also the cookie consent modals have become the bain of mobile web experience, especially when they pop up 5 seconds after the user started to read your page on mobile phone. Don't use a modal dialogue, just make a page with the cookie consent and then re-direct to the requested page. What works on desktop don't automatically work on mobile just because you slapped a few media queries in your page.

Re: Your website should work without JavaScript (2021)

#66

Earlier quoted context omitted.

But it’s also frightfully easy with such stacks to end up with invisibly broken functionality, e.g. a form that you maybe even intended to work without JavaScript, but accidentally broke in some way; or a widget that is just blank in the HTML and gets filled afterwards (this is very common). As an example of that: in https://www.joshwcomeau.com/css/custom-css-reset/ , the first code block is a loading spinner. Why it…

Good points. I might even go a step further and say that not only should you be AWARE of how your page behaves after the magic (what breaks without JS, what doesn't), you should deliberately pick and CHOOSE what's OK to break and what is essential content, and design around it. An example: At my last job (a museum), accessibility was a business need (and grantmaker requirement), and part of that is ensuring that our…

> you should deliberately pick and CHOOSE what's OK to break

Absolutely. Unfortunately this is harder to do in a Next.js world, because it’s obscured by abstractions. Life was much easier when you were clearly writing regular HTML and enhancing it with specific JavaScript because the whole thing was deliberate. With JavaScript frontend frameworks plus server-side rendering, the default is to be unaware of all of this stuff and you have to go at least a little out of your way to do it properly.

Re: Your website should work without JavaScript (2021)

#67

> Downloading d3.js (a popular graphing library) costs 1 cent in Canada. In Mauritania it costs 0.06% of the average daily income. The whatdoesmysitecost.com links are now broken and that site as a whole seems to be fairly broken, but it was discussed here last year: https://news.ycombinator.com/item?id=27759583 . They claim that the method they used to decide prices is a best-case scenario, but in reality it’s gener…

Those bits about the price in Canada feel like clickbait: technically possible, but with caveats learned only after clicking, like perhaps it's only experienced by people with non-Canadian SIMs who decide to use a terrible roaming plan instead of something better? But with the links being dead, this is just speculation -- not writing in this format (of third-party dependencies filling in what appear to be major gaps) would've been helpful to avoid such speculation in case I'm entirely off-base and that truly is the price of data somewhere.

Re: Your website should work without JavaScript (2021)

#68

I don't care so much when a site with lots of interactivity requires JavaScript, but holy heck, do few things piss me off more than a blog site with articles that require JavaScript just to read text! Whomever writes web software to do that should be ashamed of themselves. If it's really that hard for you to prerender a page on the server, then just send the text by itself. Can you do that? I don't need you to preren…

Just out of curiosity - why is this such a big deal? Personally, as long as the page has a good UI, I couldn't care less if it is being prerendered or not.

The comment you replied to says

> if I choose to let it run at all, which I won't if I can avoid it.

It's not rare for people with a security/privacy background to only allow whitelisted sites to run JS.

Re: Your website should work without JavaScript (2021)

#70
post #68

Earlier quoted context omitted.

Just out of curiosity - why is this such a big deal? Personally, as long as the page has a good UI, I couldn't care less if it is being prerendered or not.

The comment you replied to says > if I choose to let it run at all, which I won't if I can avoid it. It's not rare for people with a security/privacy background to only allow whitelisted sites to run JS.

And - what's the point? Websites that want to track you will track you anyway, there's a whole array of technologies that will let them to, and won't display anything to you if you don't run JS. Security objections are pointless, it's not 2001, JS is not anything new, and it's not at all a security risk, browsers are sandboxed and well isolated.
Post reply on HN