13 ms·
Create No-JavaScript friendly sites
- Camillo 6y agoI'd like to say that ship has sailed, but in this case it's more like the last rocket launched, Krypton was destroyed, and the last partisans of NoScript are trapped in the Dark Zone, or whatever the thing with General Zod was called. Not that big of a Superman fan.
- standardUser 6y agoThough if some people want to make websites for the 0.4% of clients that won't allow JavaScript to load, I hope they enjoy their niche hobby.
- sevenf0ur 6y agoYup, not enabling javascript is akin to using an outdated browser for better or for worse.
- ducttapecrown 6y agoDisabling Javascript makes video game wikis, recipe webpages and news articles far more usable for me. The primary content of these pages is text written in HTML, and leaving Javascript on means that the ads will make the webpage clunky, scroll badly and occasionally consume enough memory to crash the tab.
- dmortin 6y agoBut the sites need revenue too, so the way to make ads go away is coming up with a ubiquitous micropayment system which can compensate the site editors if no ad is shown.
- beervirus 6y agoThat's fine. If someone builds that, I'll sign up. In the meantime, their need for revenue is not my problem. I do not feel bad about preventing their ads, trackers, and malware from consuming my battery and bandwidth.
- Lukas_Skywalker 6y agoDisabling JS protects you from cross site scripting, invasive tracking and cryptominers though. So there‘s definitely a plus. I would like to know the percentage of sites that use JS for actually improving the user experience (e.g. voting not requiring a page reload on HN) vs. those where it‘s just a gimmick (e.g. „want to talk?“ popup). I expect the majority to fall in the second category. So I applaud every effort of websites getting rid of their JS. Disclaimer: I have JS enabled.
- superkuh 6y agoLeaving javascript running is akin to opening every email attachment you get.
- norenh 6y agoI am one of those dinosaurs that still surf with javascript (mostly) disabled. I use uMatrix to control where I accept it from and my default is to allow none to load. A remarkable amount of sites still work and you will always need to load some to get certain functions to work. However, I am always amazed how lazy devs are when it comes to purely informational sites as there should be no need to require javascript. Sure, it might help with certain cosmetics but the people who disable javascript rarely care about cosmetics (it is nice, sure, but if you cannot view the site without enabling a bunch of untrusted code to run on you computer then I really must want to visit it to enable it and reload the page). Hackernews, LWN, arstechnica are all sites that works really well without javascript enabled (ars needs it for comments, but I rarely comment so if I want to I can enable then). Reddit and many more sites somewhat needs to it but you can usually see the interesting bits without it, so if you are invested or a common visitor it is easy to enable the few needed. If you are directing your content towards the technical community, my advise would be to definitely test it without Javascript, preferably in a text only browser also. It does not need to look super pretty in these modes, but it should work. This is probably also a good foundation to provide the content to groups that uses accessibility software (think blind), but I do not know how well those tools handle JavaScript-dependant content.
- hundchenkatze 6y agoYou can access Ars' comments without JS by using the forum. https://arstechnica.com/civis/viewforum.php?f=2 https://arstechnica.com/civis/viewforum.php?f=2
- norenh 6y agoThanks! That is really helpful!
- phyzome 6y agoOne of the biggest annoyances is sites that use stylesheets to blank out the page until Javascript removes that style. I think this is to stop "flash of unstyled content" stuff that I really don't care about, but it's also trivially solvable by having Javascript add the style in question in the first place.
- brigandish 6y agoIt's one of the reasons I also started to block CSS, too. Sites tend to load quicker but I need to do more scrolling.
- city41 6y agoI agree with the author, and think this is important. But I also want to point out JS enables one to build interesting sites without a backend, by relying on data from third party APIs. Being able to quickly do "mashup" sites like this can be pretty great. The time it takes to build them is usually quite short, and the hosting is almost always free. As an example, I am currently building this site, https://mi-cov.com https://mi-cov.com, which I can host for free since the data comes from a government API. (The site is not done yet, I'm aware of the various issues it has)
- dmortin 6y agoPeople like interactive sites which give immediate visual feedback for actions. Aside from the tracking stuff it's a better user experience, so it's unlikely to go away, especially if the demand for no-js is tiny.
- josephcsible 6y agoYou can have your cake and eat it too. Use progressive enhancement/graceful degradation so that users with JS get immediate visual feedback, and just fall back to reloads without JS.
- ithrow 6y agoThat's more work and more messy than just writing the whole thing as a SPA from the beginning IME. I'm talking about real interactive applications, not simple blogs.
- enriquto 6y ago> People like interactive sites which give immediate visual feedback for actions. Precisely. That's exactly what you get by disabling javascript on most sites. Two of the fastest sites that I know are sourcehut and the D-language forums. They are much snappier than any javascript-infested site.
- dmortin 6y agoYou can use a tracker blocklist, so you don't have to disable javascript: https://github.com/notracking/hosts-blocklists https://github.com/notracking/hosts-blocklists
- TedDoesntTalk 6y agoThis looks like a dns-based solution? Most people are not going to install pihole at home. Other dns-based solutions require per-device configuration, and when you have a family with a dozen or more devices, this does not scale. That’s why ublock origin and friends are so popular.
- chewmieser 6y agoMost people aren't going to outright block JS either. It's a workable solution for people that block JS due to trackers (albeit not a foolproof one).
- JadeNB 6y agoThat's not the only reason to disable Javascript. The only way to ensure that code doesn't have any negative consequences is not to run it; post facto remedies can reduce known classes of threats significantly, but not remove threat entirely.
- mdoms 6y agoI absolutely agree that JS is over-used, but for anything other than very static content I generally am not interested in kowtowing to the strict "no JS" folks. Javascript has become a fundamental part of the web, and for the same reason I won't put in extra work to make my sites work in IE, I also will not put in extra work to make my sites work for (a vanishingly small number of) people who pre-emptively block one of the most powerful tools in my belt. On a side note, the first example the author uses for a menu alternative[0] is highly obnoxious. The "unobtrusive" example assumes that your page is written in PHP but doesn't declare this assumption up front, it leaves it until half way into the article. The example is not usable in a static website that won't properly handle a POST request. So the JS example is still vastly superior for many cases. [0] https://css-tricks.com/unobtrusive-page-changer/ https://css-tricks.com/unobtrusive-page-changer/
- forgotmypw17 6y agoWhat percentage of city bus riders or public restaurant visitors do you think use the wheelchair ramp?
- mdoms 6y agoIf I have a client requirement that calls for a high degree of accessibility this obviously changes my approach. I'm talking about things I make for myself, or for clients with less stringent requirements. Same argument goes for the IE crowd.
- janpot 6y agoWhat percentage of people in wheelchairs are able to walk but choose not to?
- a1369209993 6y agoCounting people with a broken leg who could use crutches but would be risk of further injuries due to avoidable things like falling over? More than the zero percent of people with javascript disabled who don't need either security or privacy.
- TedDoesntTalk 6y agoI applaud sites that work without Javascript. The sad reality is that the enormous popularity of SPA frameworks like React and Angular make this possibility a small fraction of important sites — e.g. I don’t know if any banking or investment website that works without JavaScript. Maybe this is less important as app-culture supplants such sites.
- superkuh 6y agoMost sites aren't important sites and most sites aren't handling monetary transactions or private information. Most sites have no dynamic content. Most sites don't need javascript at all and all it does it makes things worse. Most devs need to stop taking the crap tools they're forced to use at their paid job and using them for their personal websites.
- TedDoesntTalk 6y agoI agree. Unfortunately, it seems that Most Devs either don't agree with us or don't care.
- danielskogly 6y agoBoth of those frameworks support SSR, and can then be made to work without JS on the client side for many use cases.
- rado 6y agoAlways. My blog view is exactly the same without JS, Lightbox works as simple links and the burger is functional: https://www.rado.bg https://www.rado.bg
- danielskogly 6y agoI wrote about a generalized way to use React, Redux and SSR to make sites that work without JS a short while ago[0] and I’m currently employing that strategy for a side project I’m working on. So far the biggest drawback is not being able to do a payment flow with Stripe Checkout without requiring JS on _my_ service, because Stripe.js is required to redirect a user to the checkout session. [0] https://news.ycombinator.com/item?id=23426951 https://news.ycombinator.com/item?id=23426951
- throwaway_pdp09 6y agoAnd my response was a big thank you but some serious doubts. I'm asking for no JS when it is reasonable, and what you are trying to do is accommodate my unreasonable requirements. If I may repost past of what I said there: "I should clarify, I'm only moaning about JS used where it need not be, in the display of text and pictures. Essentially, stativc web pages. There are guys on this thread who are trying to make apps work withou JS and I'm getting uneasy about that - that level of functionality should, and perhaps must, be done client-side or the excess bandwidth and server-side load will become unmanageable. I would still not enable JS to allow those, but I can see why others would." Trying to allow for extremists like myself, well, you may be doing too much in this particular type of case. Just giving me sensible static websites is fine, I'm not asking for more.
- a1369209993 6y agoPretty much this. If you're actually shipping a web app (canonical example being a HTML5 video game), use Javascript; that's what it's for. A newpaper (/ blog / search engine / forum / user signup <form> / image gallery / video gallery (as opposed to player, although that should have clearly marked links to inert mp4-or-equivalent files) / file hosting service) is not a fucking app, but that doesn't mean nothing is. (Note: I don't know enough about stripe to say anything about danielskogly's specific case.)
- danielskogly 6y agoI completely agree, and acknowledge that there are plenty of web apps that just can't work without JS [0][1][2]. It's the middle ground of web apps that I think might have the most to gain - web apps that _can_ provide their main functionality without JS, like Asana, GitLab, Product Hunt, Pinterest, etc. [0] https://audiomass.co/ https://audiomass.co/ [1] https://html5gamepad.com/ https://html5gamepad.com/ [2] https://agar.io/ https://agar.io/
- agumonkey 6y agoa quick way to check is to use elinks for instance
- minerjoe 6y agoThis. My main browser is a modified links2 running in a framebuffer with guile integrated for serious interactive hacking. Even on this circa 2006 computer it screams loading pages. No javascript though, so my HN experience does not include any voting, eh, who needs that...?
- chadlavi 6y agoNote that this example he gives is not accessible: https://codepen.io/victorcopque/pen/OVxRbq https://codepen.io/victorcopque/pen/OVxRbq A keyboard user cannot access the hidden checkbox that controls showing/hiding the menu.
- mariusor 6y agoI wonder if a better usability example would use the <details> and <summary> elements, which support collapsing/uncollapsing.
- mariusor 6y agoI've improved the demo with <details>/<summary> and fixed the erroneous list elements form the original: https://habarnam.ro/s/demo.html https://habarnam.ro/s/demo.html
- AnonC 6y agoSimilar to the general negative experience with many Electron apps, I hate the JavaScript based rendering experience on some sites. I get very frustrated with reddit (the new UI) and Facebook, both flashing an animation or empty rectangles for a long time and me realizing that the content isn’t going to load at all and hitting the reload button to coax it to render the best time. The experience I get on these sites and also some on (not all) React based sites (including Gatsby blogs) is jarring in ways I can’t explain well. Even the full page reload of years past doesn’t evoke such a feeling of uncertainty on whether the content will load or not. Blocking JavaScript by default also makes for faster browsing on many sites. Sometimes it also bypasses all those Adblock Killer dialogs or paywall dialogs.
- maest 6y agoYou're probably aware, but just in case: old.reddit.com gives the old (js-free) interface.
- a1369209993 6y agoSeriously, kudos to reddit for even if them insist on doing the pointlessly, blatantly wrong thing, at least doing it the right way. I honestly thought they would have pulled some deprecation bullshit by now.
- ihuman 6y agoIf you have an account, there's also a preference to make www.reddit.com use old reddit.
- tartoran 6y agoThat until the old reddit is deprecated. They want people to go ahead use the new interface because it makes it much easier to insert ads, track and do who knows what kind of other shenanigans.. The thing is for us who've known a better and more usable internet, we have something to compare it to and simply say no. The newer generation of users accept it for what it is, they don't know better. Something else irks me quite a bit as well, and that is when you can't copy a link from the page or when the history is messed up when going back. It seems utterly broken, and most of the time the design is as well (but that is somewhat subjective)
- speeder 6y agoI am currently rewriting one of my companies site using Hugo, and good part of the reason is to be able to get rid of JS, it keep giving us more trouble than it is worth, constantly. At first I was afraid my new site would be ugly and all... But I got pleasantly surprised by how good HTML 5 is right now, I am yet to find anything I want to make that I can't make with just HTML and CSS.
- duxup 6y agoThe OMG JavaScript, parade of articles is tiresome / endless and IMO is trending towards the absurd, and it kinda irks me. I could really go without ever hearing someone bemoan how they rewrote an internal react site in 10 seconds with two lines of JavaScript, or whatever old wives tale they've got going on. If it was that easy then maybe it also wasn't the end times? Yeah there's a lot of pages that maybe could get away without JavaScript. But man it's not the 90s anymore, many site owners want lots of dynamic app like behaviors, and there's a real question there between "this reader doesn't want it" and "the person who is paying for the site wants some stuff". Maybe someone has Homer Simpson's web page level absurdity with JavaScript, and maybe that's Homer's page and that's ok? The browser now effectively runs apps, so it's not just going to read HTML, that's how it is, and that's a good thing the web does so much more now. Does it do everything we want / how we want/ no ... but I don't buy into the idea of a end user only web where we have to bow to the lowest common denominator as far as acceptable levels of interactivity or tech usage....
- protonimitate 6y agoAgreed, I'm pretty bored by the influx of "No-Javascript" articles being pushed to the top of HN weekly. There is almost never any new insight, and you could copy+paste comments from one to the next and not know the difference. We get it, Javascript is the worst and everything should run perfectly without it - at least to the vocal minority of users who actually care (which is basically just HN's demographic).
- paulryanrogers 6y ago> The browser now effectively runs apps, so it's not just going to read HTML The problem is that browsers are running apps when most users just want to read relatively static content. Our ever decreasing, day-one battery lives and swelling landfills are clear evidence this isn't sustainable.
- duxup 6y agoI'm not convinced that most users really care. Their eyes read, but they still interact as well.
- robin_reala 6y agoI built a side project a couple of months ago[1] that’s a PWA-installable interactive experience, but also degrades down to styled information in the absence of JS, and back to raw HTML if CSS fails. It’s surprisingly fun to build in this way. (On another note, choosing to avoid a framework and just use some vanilla JS led to an extremely fast loading site.) [1] https://www.designcritiquecards.com/ https://www.designcritiquecards.com/
- dariosalvi78 6y agocongratulations, but how many people have the time to do that? Is it really feasible on big projects?
- robin_reala 6y agoDepends what you’re doing. The majority of the site I work on for my day job is statically rendered and theoretically works without JS, but large parts (including any ecom functionality and profiles) fail. Would it be worth making them more reliable by falling back if JS fails? Possibly, but that’s difficult sometimes to argue for in today’s environment of features-first from product, and developer-experience-first from engineering. Still worth the effort. By the way, we are talking about reliability-in-depth here rather than user choice. I wrote a blog post about this a few years ago: https://www.robinwhittleton.com/2016/09/19/why-we-use-progressive-enhancement-to-build-gov-uk/ https://www.robinwhittleton.com/2016/09/19/why-we-use-progre...
- mrspeaker 6y agoI love JavaScript, but no longer trust websites to use it responsibly. There are too many vectors for tracking, so I'm forced to block. I do way too many random clicks in a day to allow JS by default. Half the pages I land on now say "you need JS to view this site", and that's totally their decision! I close the tab and do something else: they get to use JavaScript, I save a bunch of time and procrastinate less... win-win!
- hombre_fatal 6y agoWell, it's just as bad as native apps now. At least you can trivially block things in web browsers.
- Rapzid 6y agoHmmm... Nah.
- gwbas1c 6y agoI recently wrote a blog engine as a way to learn some technologies I haven't used. For static pages, I only use in-browser JavaScript to format dates to the reader's locale. If, for some reason, the JavaScript doesn't run, the date will just be formatted a little differently than I'd like. Not too big of a deal.
- dreamcompiler 6y agoMost of my web browsing experience these days involves moving the dancing monkeys out of my way so I can read the content. Nobody comes to your site to see the ads or take your survey or sign up for your email list. Nobody comes to your site hoping to have to click again and again to read the content. Nobody comes to your site hoping to have you explain to them what a cookie is for the 10,000th time and then be forced to click "OK!" before they can read your content. Nobody comes to your site hoping to have their browser fingerprinted so you can track them around the web and sell their personal information. With very few exceptions you are using Javascript not to enhance your users' experience but to make war on them, and if that applies to you I wish you would leave technology and take up farming.
- mD5pPxMcS6fVWKE 6y agoI am old. Back in 1995 web sites loaded faster with 14.4k modems than some of them load today with 200mgps connection.
- parliament32 6y agoI'd run JS by default if I could trust random sites on the internet. But, you know, that's not really a thing unless you're really naive.
- lazyjones 6y agoDoes anyone else fondly remember the time when JS was often used to reduce page size and increase loading speeds? Here's an example from memory: https://web.archive.org/web/20030806180507/http://www.tweakers.net/pricewatch/cat/65 https://web.archive.org/web/20030806180507/http://www.tweake... As download speeds increased, this went out of fashion, only to be replaced by (often obnoxious) JS-based UI elements.
- sershe 6y agoIs there an ADA angle to sue people (especially various govt agencies and stuff like banks) for discrimination based on inaccessible websites? I'd donate a lot for a credible push for bloat-free web.