Handling users with javascript disabled

As we all know javascript really helps the full user experience, giving us a fantastic possibilities in regards to UI design.

Now, for quite some time my team has made sure our websites, specifically interaction forms, had our standard Jquery based validation, but also a standard php validation in case the user had javascript disabled.

We are now developing an immense website, and developing the PHP validation to backup our usual validation method is really going to take a toll on us.

I am considering to quite simply show a warning to users that have javascript disabled that they must have in enabled in order to use the website. I know this is not exactly a popular decision, but is percentage of users that navigate the web with javascript disabled still significant?

How do you handle users that have javascript disabled?

You might get away with doing that, depending on your target group.

Though, by doing this you are excluding people viewing the website through a device that does not support javascript, or if they by any reason are not able to have it enabled. Also keep in mind, that not all screen readers are too good at handling javascript.

Professionally I dont believe this is the way to go. It could work on personal projects/websites, but not for companies or commercial solutions.

We have developed our own javascript/php framework that allow us to easily use javascript UI functionality, which all downgrade and still works if the user dont have javascript enabled. Since this is also built into the form part of our php framework, we only write the code regarding what we need on the php side, and then the system provide the javascript code required automatically.

You should be able to do the exact same with Jquery as well, so on the next project just take a little time and create the form framework/system to handle this for you. In the long haul you will save a lot of time and frustration by doing this.

If people who have javascript disabled will only see the form but still be a able to fill it, they can fill in anything they like without it ever getting checked.
That’s the whole purpose of PHP validation: to make sure people don’t enter crap values, even if javascript is disabled or breaks for whatever reason.

Forms should ALWAYS be validated on the server. Any JavaScript validation is simply there for your visitor’s convenience to give more immediate feedback.

I might have misunderstood the question, I assumed we were talking about fallback for javascript only functionality. I.e. making specific UI functionality work both for users that has and does not have javascript enabled. Like, ability to pull/move an object by using the mouse, fancy floating effects on images etc.

As the others mention, you will need to validate any date that is submitted on the server side before using it in your application. There is no exception for this.

Fantastic feedback, really appreciate it.
I was actually considering going a more drastic road, and not even allowing users with javascipt disabled to see the forms.

Like most of you, excluding users never made sense from any stand point, but should a development team invest 5% of its budget on 1% of the potential users that for one reason or another does not have javascript enabled? (it might be the case that the browser or device that does not support it)

Take note that in many circumstances a framework is not entirely applicable when you are working on a costume project. Unless you use a framework like Cake, you are going to be developing all of those validations from scratch. And its not just about form validations, menus, jquery lightboxes , they will all need a fall back.

I guess its all down to numbers, if 1% of your have javascript disabled, if your generating over 500.000 of visitors, you are excluding a lot of potential traffic.

And what is the profile of users that don’t have javascript enabled? what else cant they see? flash for sure, images, etc…

A significant number of those with JavaScript disabled are blind and therefore cannot see anything at all.

There is probably a far higher percentage of disabled people who have JavaScript disabled than have it enabled since in many cases it can interfere with the operation of the assistive technology that they are using to interact with the web page.

Those with disabilities have successfully sued web sites that have blocked them from being able to use the site by requiring a technology not available to the disabled person (such as JavaScript). If your site is intended for the general public then you probably can’t afford the possible cost of not having your pages usable without JavaScript, Flash, images etc.

Good point felgall. :slight_smile:

I guess its the same principle that has lead developers to build website that work with those assistive technologies in order to democratize content.

At first I fount it a bit far fetched that a private company would be held liable for limiting access to users without a specific technology installed, but then I came across this:
Blind Web surfers sue Target - Technology & science - Tech and gadgets - msnbc.com

So if one decides to build an e-commerce website based on flash, is pretty exposing himself to a law suit. Now if this were to be applicable to everyone, companies like Microsoft would also be liable for numerous things. (ex. you need javascript enabled to login to your windows live id, you also need the .net framework to run msn, and so on)

I guess its all down to your mindset. I have no problems in blocking content from users that don’t have javascript enabled intentionally, but for users with physical limitations that have no choice, the case is completely different.

If you dont mind me asking, how would you archive this?

You might be oversimplifying the process with javascript enabled vs disabled, on what is required on the server side.

One very important aspect to keep in mind, is that anyone that want to breach your website will be able to circumstance any javascript security measures in a few seconds.