views:

154

answers:

6

Am curious why modern browsers allow switching off Javascript.

It's so clear now that to do any substantial modern web application you need to integrate some high level of Javascript, why cant javascript be made an integral part of the browser? It becomes even more annoying especially when this option is OFF by default (IE!!)

My opinion is, it should be made a standard for all the browsers to have javascript option enabled by default.

What do you guys think?

+2  A: 

IE also enables Javascript by default.

However, any web page intending to get content across can't rely on JS anyway. The option to turn it off is also a good one in case of paranoia when security vulnerabilities are at large or when you just don't want to be annoyed by all the annoying things JS is used for on modern web pages.

I consider it as good an option to have as turning images or CSS off.

Joey
+15  A: 

Am curious why modern browsers allow switching off Javascript.

JavaScript:

  • can be used to perform very annoying operations. while (1) { alert('Have fun now.'); }
  • can cause performance issues
  • is one of the biggest sources of security problems in browsers

It's so clear now that to do any substantial modern web application you need to integrate some high level of Javascript

No, it isn't.

why cant javascript be made an integral part of the browser?

It is an integral part of the browser. The ability to switch it off doesn't change that.

It becomes even more annoying especially when this option is OFF by default (IE!!)

I'm not sure what you mean by this, but if you are suggesting that a clean install of IE doesn't have JS turned on, then you are wrong.

David Dorward
Substantial modern web application, google calendar, gmail and millions of web2.0 that use javascript frameworks like Jquery, mootools, prototype etc.
gath
I like while(1){...} stuff :D
Anil Namde
@gath So? That doesn't mean JavaScript is always a Good Thing. Most functionality those services provide can be done without JS. Google Mail for example works perfectly without...
RoToRa
But you know the pain the coders will go through to pull off a "google calendar" without Javascript, i guess the point is, its our "child" lets discipline him and incorporate him cleanly (without conditions) to the family.
gath
Not very much pain at all really.
David Dorward
A: 

I think that it's because a lot of the script out there can be buggy, slow, or even a security risk (depending on where you are browsing). People have options, and you need to code to deal with it.

Paddy
gath
+3  A: 

I'm sure you're just venting here, but being able to turn off javascript is a very good thing for many reasons both as a developer and otherwise:

  • Makes it easier to debug problems with HTML and CSS
  • Helps with a lot of privacy issues
  • Can avoid malware and other security issues
  • Speeds up the browser, reduces memory leaks, etc

Also, fwiw, there is no browser that ships with a default of javascript being off, IE included. Perhaps you're dealing with a corporate installation with customized defaults?

dasil003
True, i might be venting, but think about it for a min, i deploy my app with lots of javascript, then the user has to avoid a malware, switches off javascript, then my app wont run!!! kinda nasty.
gath
@gath: That's a normal business decision, then, though. Look whether the number of people not being able to run your application justify the cost of doing it without Javascript. It's the same for the question whether a Windows application should run on Linux too or not, for example.
Joey
No, whats nasty is the current security failure of the web to which JavaScript is certainly a contributor.
+1  A: 

What about in the corporate environment? JavaScript is used for lots of extra stuff on the internet, not least scripts, installers etc, so on that basis it's nice and easy for a company to simply disable JavaScript and quite easily prevent these issues.

In my experience disabling JavaScript also prevents annoying popups etc, which was welcomed when the interface was a touchscreen, it's not so easy to kill them off like this.

I agree that JavaScript is becoming a major part of the modern web experience, however to say 'need to integrate some high level of Javascript' I disagree with, JavaScript should be used to enhance the user experience but not rely on it. A ecommerce site should not be paralised just because JavaScript is disabled, unfortunately that is the current stae of play with some sites.

Consider researching terms such as graceful degradation and progressive enhancement.

ILMV
+1  A: 

You are making the false assumption that just because you are capable of creating a web application in JavaScript and that such an application may be of superior usability that consumers want it. Research, that I do not have to give you, suggests that users do not want usability additions when such additions are contrary to efficiency in execution or download.

Additionally, JavaScript can be used maliciously and in ways that are absolutely annoying. I remember when YouTube first attempted to introduce ads on the site. You could watch three videos and then you would be redirected to a page of ads instead of a choice of another video. In that case I turned out JavaScript to bypass the ad stupidity and then turned it back on to process the flash object request.

If I were are a security manager at a large business that did not produce web services I would recommend that JavaScript be disabled by default in the browser settings and require administrative level privileges to change it. Any browser that does not allow such administrative management from an enterprise level would be blocked from installation. In that same spirit I would also block use of Flash, completely disable the same features in Acrobat, and completely disable ActiveX. Honestly, if web businesses are not willing to provide a security solution to the horrific security condition then those businesses reliant upon such technologies would fail to receive the business of my organizations employees from company systems.