Say “Yes” to JavaScript
lucumr.pocoo.org
lucumr.pocoo.org
"Some applications now are written as frontends to APIs and the application does not provide any rendering on the server side besides a nice error message that the website requires JavaScript"
1. Fix it
2. Stop using those APIs if they will not fix it (otherwise things will not be fixed)
"Many modern web applications can be much more performant because they take advantage of JavaScript"
That's nice, but I do not want you offloading your computation onto my computer. I may allow something like Folding@Home, but why should I allow something like rendering advertising?
"User interfaces that depend on JavaScript have much better abilities to make it enjoyable for a user"
User interfaces that work with or without Javascript and only use Javascript as an enhancement give you the best of all worlds. It is not impossible, you are just being lazy and trying to shut out people who disagree with you.
"A good example for instance is payment handling on the internet."
This is kind of like saying, "Every car should have OnStar; a good example is refueling!"
"You don't get extra privacy by disabling JavaScript"
Javascript on its own is sufficient to carry out numerous privacy violations, and presents various security problems. Yes, there are other things you can do, but if I stopped you from using everything else you could still use Javascript to accomplish your aims. Javascript also presents problems for Tor users, who might be de-anonymized (accidentally or deliberately) if they allow Javascript to run.
"At the same time I can enhance your browser experience"
Please do not do this; I do not want you "enhancing" my browsing "experience." All I want is to get the information I asked for, maybe post some comments, and manage my finances. I do not need any of these websites to have fancy UI effects, and while client side validation may be convenient for me it is not something I will miss terribly. My browser already knows what tabs are, how to load images, and how to submit forms. What are you adding that is worth the added risk of Javascript?
"We as developers should be happy that browsers go our way and make our life easier."
Sorry but my browser is supposed to work for me and not for you. If this is your argument for Javascript -- it makes your job easier -- then I see no reason not to keep it disabled by default. If life without Javascript is so terribly hard, the problem is with your techniques, frameworks, and designs -- fix those and leave my browser alone.
Why is this a value judgement? Making an interface work with and without Javascript takes more time - that's a given. Surely it's up to the team working on it to decide if that time is better spent on something else?
Unfortunately, this is almost always a message explaining that your website demands Javascript, without an explanation as to why. I have yet to see the noscript message that says, "We only had time to create one version of the website, and we are too busy doing other things to create a non-Javascript version." I am not even sure what sort of technical reason could be given for requiring Javascript for form submissions or hyperlink functionality...
It should be a one-time cost if your design is not broken somewhere. There is not a lot of functionality that requires Javascript. I understand that having an in-browser spreadsheet automatically update cells as things change is going to be tough without Javascript, but that does not excuse the more basic things people use Javascript for: form submission, hyperlinks, loading text, etc. Your design is flawed, at a fundamental level, if you need to do a large amount of extra work to have this basic functionality work without Javascript.
Really though, in an age of web toolkits and large frameworks for creating pages with all this Javascript, there should not be any need to make such a choice. Whatever you are building your website on should already support a non-Javascript version; the only real issue is when you need to do something that is not already part of that toolkit. Again, I understand that sometimes Javascript really does make a particular feature of a website possible, but I am asserting that the vast majority of Javascript out there has nothing to do with such features.
"Surely it's up to the team working on it to decide if that time is better spent on something else?"
Users have to deal with the consequences of those decisions. If I cannot pay my hospital bill without enabling Javascript, then I have to enable Javascript -- regardless of my reasons for disabling it (and if for some reason I cannot enable Javascript at all, I cannot pay my hospital bill). Whitelists are not really a great solution; any NoScript user has surely had to play the "enable Javascript here, here, here, and here" game, trying to guess which scripts are important for a website to function and which are malicious advertiser scripts.
If your app doesn't work in links, lynx and w3m, then you're just being lazy.
To take a trivial example: If HN didn't use js, an upvote would mean a server roundtrip and a payload of 50k or more for popular discussions. So mobile users get shafted. Crappy hotel wifi users get shafted. You are forced to update all discussion threads, even one you might be in the middle of, just to upvote. Basically, your experience is made worse.
And this is about the simplest use of JS I can think of. For other sites there are great opportunities to make your user experience better.
I am able to upvote posts and articles without Javascript enabled on HN...
Now back in reality: my 1GB RAM netbook can afford about 15 pages, much less my 400MB smartphone. Such incredible hardware spoiled by feature misuse.
Web fonts, animations, components and tracking can go to hell. If people disable a feature there is a reason. If there are not many of them and they are highly educated, other just don't know how to remove all that crap.
In the end only text meters.
In conclusion, the browser is not simply a vehicle for displaying HTML content with links and simple forms anymore, it's an application platform, just get over it.
Surprisingly I have found that quite a few websites look better with no JS, probably due to their fancy fonts being disabled.
I wish people would make good HTML/Web Apps instead of trying to (badly) imitate desktop apps. To me, that means being lean and embracing the transactional style (see 3270).
I see very few convincing reasons to start running code in order to display a text article or video, apart from better ad tracking.
Typical worrisome cases are when a malicious script scrapes credential forms or the tracking of mouse cursor movements / page scrolling for advertising analytics.
Essentially, I'll tolerate the web server having logs of my access to the page, but what I do once I've rendered the page should be my own business.
You do realize that the only way JavaScript runs on a page is for the remote site to choose to include it, right? If you don't trust their JavaScript why would you ever put sensitive information in a form and submit it anyway?
The capabilities of this company in particular might motivate a few readers: http://www.clicktale.com/products/mouse-tracking-suite/visit...
If I want Javascript off on a webpage, I think I should be able to do that. Preferably with a keyboard shortcut or an easily accessible menu option (like Opera), because I agree with one thing (that the OP implied):
I can't be browsing the web, with Javascript disabled, and expect that everything works.
And recently I've been trying to come to terms with the fact that if I'm browsing without Javascript, a lot of things will stop working with no explanation or even an error message. It would be nice, but it's clear one cannot reasonably expect that.
I want to be able to disable JS just because. Yes most websites are well-behaved and use standard libraries and there is not much reason to disable JS, nothing you can't fix in a better way (I also agree often other ways would be "better").
But there are also non-well-behaved websites out there. So I want to be able to selectively enable and disable all types of content: images, CSS, JS, plugins, sound, video, you name it. Preferably all these settings would be saved per site (like Opera).
But what if I'm not interested in 'web applications' and I just want to read web sites? Apparently Firefox isn't designed with that task in mind anymore.
in Firefox it used to be in one of the menus, something about styles.
i'm not sure if Chrome can do it without a plugin.
Firefox: about:config > gfx.downloadable_fonts.enabled > false
Chrome: Add --disable-remote-fonts as start parameter
1: http://www.techpowerup.com/forums/showthread.php?t=184198
https://chrome.google.com/webstore/detail/change-colors/jbmk...
[Citation Needed]. I find this incredibly hard to believe.
Then that dirty nasty icky javascript that you hate so much will be blocked from even being requested over the network.
Another example is JavaScript itself.
Now is there a way to disable modal/lightboxes with advertising offers or links to social media networks? I find that incredibly annoying.
Oh well. At least I'll always have Emacs.
It's amazing just how bad Web Developers are.
There are? I've never heard of that happening. The author should provide some kind of empirical evidence on the prevalence of that problem.
>It's a great day for a web developer when we can finally assume that a browser will have JavaScript running.
You can assume that without removing the option to disable JavaScript. In addition, technical users (the only one's who are disabling JavaScript) can still disable JavaScript using add-ons or using other browsers.
> It's a great day for a web developer when we can finally assume that a browser will have JavaScript running.
That's a very good point. Even blind people no longer run their browsers with JS disabled [1]. As long as the content and navigation make semantic sense, I don't think there's any reason for a web designer or developer to refrain from adding frills with JS nowadays, any more than there is reason to refrain from using CSS. Both are integral parts of the package of specifications we call HTML5.
If a user even bothers to disable JS, he's intentionally asking you for a different experience, so give him a different experience! As long as the text is readable and the navigation links point to the right URLs, there's no need to try to make the <noscript> experience identical to the normal experience. No sane developer tries to make the no-CSS experience (e.g. lynx) identical to the normal experience, right?
My only complaint is with certain websites that make absolutely gratuitous use of JS, like using AJAX to load the text content of the page. That belongs to the same category as using tables for the entire layout. You don't go about disabling <table> tags just because people abuse it in annoying ways.
[1] http://a11yproject.com/posts/myth-screen-readers-dont-use-ja...
Essentially all you need to do in order to not break the experience for text-only users, is to have your server generate a sane HTML document in the absence of JS and CSS. It's generally not that hard, unless your site is a single-page app where everything is in a client-side Javascript framework. In that case you would actually need to build two separate sites, and most devs probably aren't going to bother since text-only users are a low single digit percentage of internet users as a whole.
I normally get along with Armin, but I feel that he left out a key thing here: Some people disable JS because they feel that JS obfuscates and degrades the Web-browsing experience. Sadly, we are no longer catering to these people: viewing a website without JS enabled should not render the fundamental content of the website unavailable, and we have forsaken that ideal in favor of fancy bells and whistles on our pages.
There's a fourth reason, as well: JS should not be required on grounds of security, not just privacy. Sites should not have to run what is essentially unsafe, privileged, arbitrary code in order to do their daily business. A company might claim that their JS is harmless because it only animates a title bar or powers a dropdown menu, but proving that requires a manual audit of all JS on the page, which amounts to thousands of lines of JS on a modern site. (Have you read through the copy of jQuery being served to you? Probably not.) Common repositories of JS ameliorate the problem somewhat, but it can't be eliminated.
This is not okay, by the way. Requiring JS to read a news article, or upload an image, or view a forum thread, is insane and we should not tolerate it.
JavaScript is by far the most heavily sandboxed, restricted code in common use. If you think it's harmful to have JS running on someone's site you need to learn more about web security.
https://en.wikipedia.org/wiki/Clickjacking
It is definitely problematic for me to have Javascript running from arbitrary untrusted sources.