3 ms·
Back in the day we’d all have scoffed at such a thing... What’s changed since then? Why is this now an acceptable practice? The only reason it wasn't acceptabl
by sounddust 16y ago
Back in the day we’d all have scoffed at such a thing... What’s changed since then? Why is this now an acceptable practice?
The only reason it wasn't acceptable to require Javascript many years ago is because each implementation was so different that it was impossible to guarantee cross-compatibility. If you used JS, it would almost certainly mean that you would render your site useless to a significant group of your users.
Those times are over; Javascript is so consistent across browsers that it's extremely rare to see cross-browser issues unless you're on the cutting edge of web development. And those implementations are converging, so these problems are quickly going from rare to nonexistent.
So the answer is yes, it's acceptable.
- lotharbot 16y agoOne major reason it wasn't acceptable to require Javascript many years ago is that many people had it disabled for good reason. Malicious code, popups, and browser crashes were quite common. Furthermore, browser security settings didn't always allow users to enable javascript site-by-site, so enabling it to have a good user experience on your site meant they'd also have a very bad user experience elsewhere on the web. Most of those issues have gone away. It's still better to have a slightly degraded user experience for your non-javascript users, rather than a complete site failure, but it's not nearly as important as it was in 1997.
- JoachimSchipper 16y agoUmm... malicious code, popups and browser crashes/attacks are still common, and still rely on Javascript. It has become much less convenient to disable it, but...
- Groxx 16y agoCrashes are now mostly the domain of Flash, though. JS hangs in an infinite loop sometimes, but that's not a crash. Actual JS-originated crashes are exceedingly rare in my experience, and are usually the mark of an experimental-build browser. Popups are largely handled by every major browser having popup blocking that works reliably enough. Malicious code is what the ad-supported internet runs on. The only thing they can hit is your already-public data - the use of that data is the only thing that can be construed as malicious.
- kls 16y agoIt's still better to have a slightly degraded user experience for your non-JavaScript users, rather than a complete site failure I would suggest that a company look at their web analytical and make that decision. I know that for most of my clients their trends show less than 1% for JavaScript disabled. This, weighed against maintaining a degrading site programming model, to support 1%, did not make economic sense, given that those dollars could be used for multilingual translation, (a far larger segment). This is really a question that is best answered by looking at your sites trends. For us it made more economic sense to do a JavaScript detect and if they did not have it enabled pop a page suggesting FF, Safari or Chrome.
- carussell 16y agoI would suggest that a company look at their web analytical and make that decision. I know that for most of my clients their trends show less than 1% for JavaScript disabled. If you do take this approach, remember to be a good scientist by making sure you respect the control aspect of the scientific method. Specifically, if you already require JavaScript for your site, you should not even venture to extrapolate an answer, even if you think you're going about it in a reasonable way. I recently had a conversation (although it was less like a conversation and more like a few frustrated, snarky comments from me) with a developer who claimed that 99% of his users browsed his page with at least 1024 pixels. Even ignoring for the moment the issue of screen width not being the same as the size of the browser window on the screen, I asked why he would expect otherwise from users of a web site which required that kind of width before it begins to invoke frustrating things like horizontal scrolling.
- xenophanes 16y ago> it's extremely rare to see cross-browser issues unless you're on the cutting edge of web development Or you have IE6 users.
- TeHCrAzY 16y agoUse jQuery or another framework. The only issues with JavaScript in IE6 is interacting with the DOM. The actual JavaScript implementation is fine.
- philh 16y ago>The only reason it wasn't acceptable to require Javascript many years ago is because each implementation was so different that it was impossible to guarantee cross-compatibility. If you used JS, it would almost certainly mean that you would render your site useless to a significant group of your users. You couldn't pick two or three or n browsers with 99% marketshare and make sure your website worked in them? I don't believe the browser market has been so fragmented in the last ten years that this was infeasible. One objection used to be that requiring javascript locked out disabled (particularly blind) users. Has that changed? Does anyone know the state of screen-reading browsers these days?
- sounddust 16y agoYou couldn't pick two or three or n browsers with 99% marketshare and make sure your website worked in them? No, you couldn't. Back then, the web was split between two major browsers: IE and Netscape. However, the feature set of what was supported in JS was not only completely different among the two, but also completely different among different minor versions of the two. Things that worked on Netscape 6.x would be broken on 6.(x+1), and work again in 6.(x+2), although with a different calling convention. It was mind-numbingly frustrating, and I don't think it would have been humanly possible to write JS that supported all minor iterations of each browser and maintained any sort of complex functionality. By contrast, in 2006, I wrote a JS library that worked on IE6, Firefox 1.0+, and some early version of Safari. It has worked ever since, among dozens of versions of those browsers. That's the difference. (Edit: I'm struggling to remember what version Netscape was around 10 years ago; the version number above might be wrong.)