-
Disabling Javascript.
What percentage of browsers have javascript disabled? Anyone have a figure for me?
I'm just a little worried (perhaps unnecessarily) about writing pages that are too reliant on javascript, and then someone coming along, entering something foolish and messing up my database.
(Come to think of it, do you think browsers should even have the OPTION of disabling javascript?!)
-
Never, ever use javascript for client side form validation without having some back up in the server side script - you're leaving your site wide open for crackers if you do. All they have to do is disable javascript in their browser and your form validation will no longer prevent them from deliberately breaking things. Javascript validation is fine for warning the user that they have not filled things in correctly before they submit the form (thus preventing them from having to wait for the page to reload) but anything security related must bve handled by a server side script as well.
According to this page, 11% of internet users do not have javascript enabled. You should always take such statistics with a grain of salt but that's still a good indicator that you should not rely on features that only work with javascript turned on.
As for browsers being able to disable javascript, this is just part of how the internet works. HTML (and XHTML) is meant to be a language for distributing content in a way that can be understood by multiple browsers running on multiple platforms. Javascript is an addition to HTML that adds an element of interactivity to HTML, but it is by no means an essential part of the web. Search engines, text browsers, speech browsers and mobile devices are all examples of user agents that have no reason to support javascript - the web is meant to work for all of these devices so there is no way javascirpt should (or would) ever become compulsory.