TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Your website should work without JavaScript (2021)

129 pointsby nameequalsmainover 2 years ago

24 comments

cercatrovaover 2 years ago
I used to think this. I even used uMatrix (RIP) to disable all JS. After a while though, it simply wasn&#x27;t worth it. You&#x27;ll have a vocal minority on HN of JS disablers, but the truth is most people don&#x27;t know or care about JavaScript, much less want to disable it. So, it&#x27;s really not worth catering to this 0.2% or even 1% of people as the article cites.<p>There are just too many interesting things JS can do. I&#x27;ve been playing around with Three.js and it&#x27;s been incredible the types of 3D art you can create. I want to make those experiences for users which is simply impossible without JS.<p>However, I will also say that most of the websites I do make will work without JS because I use Next.js as a server rendering framework, plus CSS can handle a lot of things these days, such as modals, link trees, etc that used to require JS and I use those where possible.<p>What I will not do though is re-implement logic just for JS disablers. A particular example is using an animation library like Framer Motion that works with JS. It is somewhat possible to achieve similar effects in CSS, creating your own spring function in SCSS for example, to interpolate between values, but I&#x27;m not going to do that because it&#x27;s effectively double the work for 1% of the users. Even the 1% figure is misleading for production apps if you use TypeScript (to prevent JS breakage) or modern dev practices like distributed CDNs (to prevent a package from getting loaded).
评论 #33217235 未加载
评论 #33217516 未加载
评论 #33217739 未加载
评论 #33217877 未加载
评论 #33220874 未加载
评论 #33217564 未加载
评论 #33218234 未加载
recursivedoubtsover 2 years ago
I would very much like for HTML to incorporate concepts from htmx (particularly more flexible transclusion) so that more dynamic websites and applications can be built entirely in HTML.<p>JavaScript became popular because HTML stopped moving forward as a hypermedia, focusing instead on client-side features that, while certainly nice, didn&#x27;t increase the expressive power of the format in terms of hypermedia.
评论 #33219007 未加载
评论 #33215766 未加载
评论 #33218410 未加载
TimPCover 2 years ago
Why you should double your workload in designing a website to support 2 in 1000 users. By said no PM ever.
评论 #33217503 未加载
评论 #33218240 未加载
ravenstineover 2 years ago
I don&#x27;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 <i>just to read text!</i> Whomever writes web software to do that should be ashamed of themselves.<p>If it&#x27;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&#x27;t need you to prerender your header, your footer, your menus, or any of that junk. Give me the text body. Place it in an element your JavaScript code can replace when it boots, if I choose to let it run at all, which I won&#x27;t if I can avoid it.
评论 #33216230 未加载
评论 #33216016 未加载
评论 #33219077 未加载
评论 #33216930 未加载
sylwareover 2 years ago
The real pertinent reason to regulate and to get noscript&#x2F;basic (x)html web portals (at least on &quot;critical&quot; online services) is that &quot;javascript&quot; requires a grotesquely and absurdely massive and complex web engine, including its SDK.<p>The only web engines today are blink&#x2F;geeko, financed by google(vanguard&#x2F;blackrock), and webkit financed by apple(vanguard&#x2F;blackrock). They are all written using c++ which has also a grotesquely and absurdely massive and complex syntax, and better not have a look at the compilers... aka double the pain.<p>In other words: &quot;javascript&quot; = don&#x27;t have &quot;big tech&quot; controlled software? no web for you!<p>hard truth: bazillions of online services can work perfectly without a &quot;javacript&quot;-able web engine (javascript alone is some work but several orders of magnitude less), namely basic (x)html forms can do wonders... and actually they were!! But web dev tantrums and planned obsolescence got involved.<p>The only way out of it is very strong regulation, and I am personally seeing lawyers to seek noscript&#x2F;basic (x)html interoperability on &quot;critical online services&quot;.
评论 #33217921 未加载
评论 #33217885 未加载
评论 #33219642 未加载
评论 #33220865 未加载
superkuhover 2 years ago
It&#x27;s pretty simple. If you&#x27;re doing it for profit, use whatever is cheapest&#x2F;fastest (ie, JS devs and their transient frameworks). If you&#x27;re making a website for human people meant to last more than 3 years, use HTML.
评论 #33216327 未加载
lagrange77over 2 years ago
I guess in real world scenarios, <i>progressive enhancement</i> is the way to go for many sites (like embedded web interfaces).<p>Offer the minimum core functionality without js. Add js for better UX and additional functionality.
评论 #33215263 未加载
dewormsover 2 years ago
Purists who refuse to load websites with JS are such a small percentage of visitors they can be safely ignored. It&#x27;s an uphill battle that they&#x27;re losing very fast. I don&#x27;t think you can use more than 5% of websites without JS in any capacity.<p>The whole point of websites is lost if they can&#x27;t track visitors, see what they&#x27;re paying attention to, and how to manipulate their behavior. Everyone&#x27;s doing it, and if you don&#x27;t, you&#x27;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 &quot;content writers&quot; never intended to be read by actual people, they&#x27;re there for the google bot to keep some activity going.
评论 #33216559 未加载
评论 #33216189 未加载
throw_m239339over 2 years ago
Your mobile website certainly should require as little javascript as possible. You don&#x27;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&#x27;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&#x27;t automatically work on mobile just because you slapped a few media queries in your page.
jakearover 2 years ago
This is the site in question: <a href="https:&#x2F;&#x2F;missingdice.com&#x2F;dice-roller&#x2F;" rel="nofollow">https:&#x2F;&#x2F;missingdice.com&#x2F;dice-roller&#x2F;</a>. It’s a nice site, I like it.<p>But if I made that site with JS, and some user wrote in telling me they disabled JS and it didn’t work, I’m much more likely to tell them to either enable JS or pound sand than I am to reimplement the logic on a platform where any requests beyond 125k&#x2F;mo or 100hrs compute start billing me.
fexeleinover 2 years ago
As recent as 2016 I was building some sites without any JavaScript. These weren’t small sites either. You can achieve a lot using some basic forms. It was quite fun
评论 #33216775 未加载
评论 #33215170 未加载
评论 #33215175 未加载
abemassryover 2 years ago
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.
评论 #33216224 未加载
评论 #33215765 未加载
评论 #33220965 未加载
mro_nameover 2 years ago
&gt; Building everything you can without js will make your site:<p>an immediately readable text rather than a program that tries to generate one.
Lucentover 2 years ago
This proved tricky for me because of Core Web Vitals. I made ptable.com work without JS, but I still show &quot;dead&quot; interactive components (the properties area above) because expanding it when JavaScript arrives would destroy my Cumulative Layout Shift score.
评论 #33215932 未加载
kgbciaover 2 years ago
i don&#x27;t think vanilla html saves more bandwidth than JavaScript. if a part of your website needs update (react,vue,fetch) only that part is transmitted over the wire. It&#x27;s also less jarring for the user, since most browsers would scroll the content to the top.<p>Also, without JavaScript, some webapps would require storing user state in a server database rather than in memory of the browser.<p>Fix html and we won&#x27;t need JavaScript.
评论 #33215941 未加载
评论 #33216441 未加载
评论 #33218632 未加载
dustedover 2 years ago
is it even a website if it does not work without javascript, https and websafe colors?
评论 #33215167 未加载
unreal37over 2 years ago
I guess it depends if your website does something valuable or substantial.<p>If it&#x27;s just your hobby site... great, develop it without JS.<p>But if it&#x27;s a site people pay to access (or requires ads) and they expect some functionality - like Youtube or Netflix say - I don&#x27;t think this is possible.
评论 #33215538 未加载
encryptluks2over 2 years ago
Once WASM becomes popular almost no website will work without JavaScript.
评论 #33215168 未加载
chrismorganover 2 years ago
&gt; <i>Downloading d3.js (a popular graphing library) costs 1 cent in Canada. In Mauritania it costs 0.06% of the average daily income.</i><p>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: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27759583" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27759583</a>. They claim that the method they used to decide prices is a best-case scenario, but in reality it’s generally not far off a worst-case scenario, regularly off from the likely realistic case by at least a factor of ten. Though there certainly are scenarios where the cost will be even higher than the figure presented.<p>—⁂—<p>&gt; <i>Very old browsers like IE &lt; 3, Netscape 1, Mosaic, and others don&#x27;t support javascript. Almost nobody uses these browsers anymore — but you can bet somebody is.</i><p>Your site <i>should not work</i> in those named browsers, because you should be serving by HTTPS only (no, your general-purpose public-internet site is <i>not</i> an exception). And using comparatively recent cipher suites so even things like IE 8 should not work. But the likes of Lynx, sure.<p>—⁂—<p>For my part, I default to turning JavaScript off via uMatrix because it makes the web better and faster and lighter far more often than it breaks things. But I also have that extension disabled in Private Browsing windows, so if I want to run something with JavaScript I can open it that way nice and easily.
评论 #33216675 未加载
评论 #33216310 未加载
评论 #33215486 未加载
dehrmannover 2 years ago
About a decade ago, the internet disagreed, and everything started requiring JS.
评论 #33215970 未加载
评论 #33215945 未加载
评论 #33215968 未加载
labradorover 2 years ago
I&#x27;m not convinced by the reasons put forth in the article
sweetheartover 2 years ago
I’ve found that the best browsing for me has been a result of disabling HTML and CSS as well. No errors, 0 load time, accessible to anyone even if they don’t have a computer or internet connection. Websites built without JS is cute but if you’re serious about fast, accessible, error-free browsing then using HTML and CSS is really just bloat.
评论 #33215798 未加载
评论 #33215311 未加载
评论 #33215282 未加载
评论 #33215561 未加载
评论 #33215242 未加载
评论 #33215463 未加载
verisimilitudesover 2 years ago
I go further than handwritten HTML and CSS. I also have a Gopher hole. The only advantage a browser such as Emacs&#x27; eww has over an Emacs Gopher client is that eww is included by default. It also leads to good practices such as avoiding superfluous images and styling. Another advantage is the relatively small set of people using Gopher, meaning people who use it are more likely to reach out or similar things, like the older Internet.
zaptheimpalerover 2 years ago
I make sure that my websites require JS to function even if not needed just to annoy the blockers. It&#x27;s 1% of users demanding the world bend to fit their preferences, like a lot of annoying vocal minorities.