Apparently less than 1% had javascript off in 2010: http://developer.yahoo.com/blogs/ydn/posts/2010/10/how-many-users-have-javascript-disabled/
So is it worth it to still support browsing without javascript?
For example:
Form submissions. Normally I would set up click or change events on form elements and just update the current page HTML from the response. But if the user has js disabled, the form cannot be submitted, and it won't work.
If I have to take into consideration that the user has JS off, then I need to wrap my input elements within <FORM>
, add a submit button and add additional mark-up on the current page to handle the form submission results...
Anyway there's a lot of extra work to do in this case.
Another example - replacing generic form elements with DIVS that you style to look like cooler input elements, and make them behave like generic inputs trough JS. Again, users without js won't be able to do anything with them.
Or a different example, the UI created by JS on page load. Besides the fact that non-js browser won't display the UI, there's also a small problem with JS-capable browsers which will show a ugly UI until the page is full loaded and the JS gets to be executed.
Are these drawbacks important enough to take into consideration, when less than 1% of your visitors are affected by them?