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.
Your website should work without JavaScript (2021)
61–70 of 159 posts
Re: Your website should work without JavaScript (2021)
#62Purists 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…
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)
#63I 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.
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)
#64I 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…
Re: Your website should work without JavaScript (2021)
#65Re: Your website should work without JavaScript (2021)
#66Earlier 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…
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…
Re: Your website should work without JavaScript (2021)
#68I 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.
> 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)
#69It's pretty simple. If you're doing it for profit, use whatever is cheapest/fastest (ie, JS devs and their transient frameworks). If you're making a website for human people meant to last more than 3 years, use HTML.
Re: Your website should work without JavaScript (2021)
#70Earlier 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.