Topic: Is it mean of me to turn away non javacript users?

So far on my first project I've managed to make sure things degrade fairly gracefully, however I'm already seeing where the problems come in in accommodating this.

As an example, I have a page with 4 forms on it.  One form enters a food item into the database and includes 3 drop downs for categorisation.  The other 3 forms are simple textfields to add extra items to those categories.  I use the same page for new items and editing, and this is where my problem comes in with JS turned off.

You browse to food/edit/<id> and it displays everything in the form.  You then decide to add a new category but when that form's completed it doesn't know whether the main form on the page was called with the edit action and an id, or the new action, so doesn't know where to send you afterwards.

All of a sudden what doesn't even need consideration when using AJAX now involves loads of extra logic to work out where you've been and where you're going.

Now I'm thinking I'd like to put everything on one page and have the new item form in a toggled div, etc, and the thought of making that degrade gracefully sounds like a nightmare.

So, I'm still new to this and am still learning the ropes when it comes to how best to do things - are my conclusions right?  It seems to me that making your app degrade gracefully isn't just about implementing the same features in a non JS manner, and that unless your app is using AJAX in anything but the simplest of ways you're in for a world of pain.  It almost seems easier to produce a whole separate implementation to serve non JS users.

So, for me I think I'm going going to make it clear it's a JS only site.  It's quite niche and my whole reason for creating it is that it's something that's currently only served by sites with clunky interfaces.  It involves entering a fair amount of data and pulling in info from many sources, so simple routine use involves a lot of page views - therefore I reckon producing a decent AJAX interface will give it a very good edge.  If a user doesn't use AJAX, it's really lost it's purpose and they might as well be using one of the other existing services.

Out of interest, I thought I'd see what the Pro's do and see what happens in Basecamp when I turned off my JS - some things worked, some didn't.  Interesting!

Anyway, I was interested in getting other people's opinions on the matter and thought it might make a good discussion point.

Cheers,

Jon

I can't stop thinking about Rails. Can't sleep, can't eat, can't concentrate on work. It must be love.

Re: Is it mean of me to turn away non javacript users?

It's really your call. There is a very small subset of users who won't use JS:

1. Paranoid - There are a few sites with nasty JS who pee in the pool and ruin it for everyone. So some people have JS off to block malware or adverts.
2. Clueless - These are users running really old browsers that just can't cope. Or users who managed to turn it off and can't get it on again.
3. Mobile users - I don't know for sure, but its reasonable to assume that some mobile browsers just don't have perfect JS support yet. Especially since AJAX is 'chatty' and will run up the bandwidth charges.
4. Locked down users - Such as library patrons or students who don't have much say in the IT policies.

So for what your site does, do you need to appeal to these users?

If you can't (or won't) update the site to degrade gracefully, at least offer a helpful alternative. Some Google apps may not work in Opera, so Google kindly suggests that I use IE 7 or FF before letting me try it anyway. It's not quite graceful, but its better than a hard failure.

By and large though, JS is common and accepted as a normal means of doing something.

PS - Google apps do work in Opera.

Re: Is it mean of me to turn away non javacript users?

You're safe assuming Javascript for almost every visitor. Really very, very few people browse unable to load Javascript. Some mobile devices might, but the guy I know knows it's his device, not the interweb, that's broken.

Do keep in mind that GoogleBot has no concept of Javascript/Ajax so you need to make sure GoogleBot can reach the critical parts of your site.

email the future with www.l8r.nu

Re: Is it mean of me to turn away non javacript users?

That was largely the same train of thought I'd gone along.

Situation 1 is something I'd try and tackle by some sort of education / persuasion that the user is missing out on a big portion of new functionality being offered by sites.

Situation 2 my thoughts are really, to quote Pragmatic, "Come back when you've discovered fire".

Situation 3 doesn't really apply to me and I think if I did try to make a mobile interface it'd probably be a complete dedicated code base.

Situation 4 is the main one I'm concerned with.  It'd be a shame if let's say one of my users wasn't able to use it from work because of lock downs.

I guess that's what I'm trying to judge - in the real world how big are each of these problems.  My only insight into that is the fact that my day job is in a fairly typical UK corporate environment and my browser's JS isn't turned off.

How often am I going to run into a paranoid user who's going to turn their nose up at my site because they don't want to turn on their JS?  How common is it for a company or public access terminal to turn off their JS?

I can't stop thinking about Rails. Can't sleep, can't eat, can't concentrate on work. It must be love.

Re: Is it mean of me to turn away non javacript users?

joost wrote:

Do keep in mind that GoogleBot has no concept of Javascript/Ajax so you need to make sure GoogleBot can reach the critical parts of your site.

Thanks joost, that's a good point but luckily not an issue for me in this situation.

How about my thoughts as to the challenges of coding a site that degrades gracefully?  Is my assessment of the situation correct, or could I be approaching the matter in the wrong way?

I can't stop thinking about Rails. Can't sleep, can't eat, can't concentrate on work. It must be love.

Re: Is it mean of me to turn away non javacript users?

By the same token - would you exclude people who use IE, just becuase it's a security risk?

I suppose this will boil down to - who are your target users, corporate, military, casual and what level of interaction/services will your site offer, e.g. blog, shopping cart, library.

Look at this situation from the user and determine the best way to serve that user.

BTW: I generally have JS turned off and only use Firefox when I'm logged on using Microsoft.

Steve.

Re: Is it mean of me to turn away non javacript users?

A good way to degrade this situation gracefully is using partials... a lot.

Say you have 4 forms.  Make all the partials load and make them visible.  Then hide them with Javascript.

That way, your javascript / AJAX call can just blind_down a partial as needed, while your controller can fall through to the page with the partials displayed.

The only real con to this is that on page load, if the user has a slow selection, they will see an unstyled page with everything on it.

This also handles the google bot problem as well as all forms / links are available at all times, just hidden.

Regards

Mikel