3 ms·
What website nowadays you do not ever truly need JS?
by dfar1 11y ago
What website nowadays you do not ever truly need JS?
- sotojuan 11y agoMost websites whose primary use is conveying information and documents.
- zeveb 11y agoIf you're displaying text, then you don't need JavaScript. If you're displaying images, then you don't need JavaScript. If you're displaying short animations, then in theory you don't need JavaScript (I don't know how widely support APNG is though). If you're displaying movies, maybe you need JavaScript? I don't know if HTML5 video can work without JavaScript (it ought to be able to, but lots of things which ought to be aren't). If you're accepting user comments, you don't need JavaScript. Forms work just fine without it. If you're accepting user votes, then you don't technically need JavaScript (but the experience will probably be better with it, unless you're smart). Really, it's hard to see what one truly needs JavaScript for. Slowing down pages, sure. Destroying your readers' privacy, certainly. Getting root on your readers' computers, no doubt.
- Animats 11y agoI tend to agree. There are far too many purely static sites that just don't need Javascript. Here's a fun site of mine which has no Javascript, other than in iframes which display video hosted elsewhere.[1] (If Firefox would play HTML5 video from a plain .MP4 file, I'd get rid of that, too.) [1] http://www.aetherltd.com http://www.aetherltd.com
- elithrar 11y ago> Getting root on your readers' computers, no doubt. Since when? The only JS privilege escalation is this Firefox vuln from 2008: https://www.mozilla.org/en-US/security/advisories/mfsa2008-14/ https://www.mozilla.org/en-US/security/advisories/mfsa2008-1...
- gsnedders 11y agoAny RCE exploit can likely be combined with any other OS vulnerability to get privilege escalation.
- krapp 11y ago>Really, it's hard to see what one truly needs JavaScript for It's a Turing complete language. You truly need it if you want to do any computation in the browser, modify the DOM, work with Canvas or make asynchronous requests. Yes, we could all go back to the way the web was in the early 90's when every site was nothing but text and images (and the occasional Java applet) but doing so would also disregard a lot of the very interesting things that javascript allows the web to do as a platform for serving applications as well as documents. It may be true that most of the web might not absolutely need it, but let's not pretend it serves no valid purpose at all.
- zeveb 11y agoYeah, I was being a bit negative. I'm actually not opposed to the idea of web apps (although I think that the sole virtue of HTML+CSS+JavaScript is that it exists): they really can be useful, and there's no good alternative (which is truly sad). What annoys me to no end is 'apps' which are really just content browsers. I already have a content browser: it's called…a browser. There are well-defined semantics about how it retrieves content (resources). It works on the command line, within emacs, in a TTY, in a GUI and on my phone. It can be configured to run no untrusted code. It's really, really powerful.
- e12e 11y agoWebsites don't need javascript in general[1], webapps often need javascript. [1] For example HN, doesn't need javascript, but for the vote-buttons, js is nice. With a pure html-page, the difference between a get with a vote-parameter and an ajax request shouldn't be terrible, with gzip compression etc. Maybe it's even possible to abuse something like status 304 to avoid a reload for a "/thisPage?upvote=someid" from "/thisPage" (with CSRF delegated to a document cookie?). Granted HN might not be the pinnacle of graphic design, or UI -- but there's lots of room for improvement that doesn't have to involve js.
- krapp 11y agoUnfortunately, every otherwise static site using a framework like AngularJS becomes a webapp by definition, whether they need to be or not. I think a lot of the problem is that it's no longer considered professional to do otherwise. You can put a javascript framework on your resume, but writing your own html, css and javascript comes across as carving your own canoe with a flint axe, and the "minimum viable product" for more and more sites involves more and more javascript by default. No one even bothers try to optimize, or learning how to think outside the box that jQuery and frameworks put them into because it's just assumed you can pile on as much javascript as you like it'll just work, as if bandwidth and RAM are practically infinite. And for the most part, that point of view is correct... but eventually, the end users are going to notice that things are slower than they should be.
- e12e 11y agoAnd some webapps don't need javascript. Google.com still works from a w3m session (as well it should).