homepage Welcome to WebmasterWorld Guest from 54.161.236.92
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

This 53 message thread spans 2 pages: 53 ( [1] 2 > >     
JavaScript disabled? I don't care!
Trace




msg:3472896
 4:49 pm on Oct 9, 2007 (gmt 0)

Seriously, do we really have to specify in every thread that "your page will be inaccessible to those with JavaScript disabled"?

I realize it's just a pet-peeve of mine but c'mon, we get it already. This is a JavaScript forum after all. If people are asking a JavaScript question in a JavaScript forum, I'm fairly confident that "duh, won't work for those with JS off" isn't the answer they are looking for.

When's the last time you installed a browser that didn't have JavaScript enabled? That means that anyone hitting your page with JavaScript turned off is someone who manually went into his options and turned them off. Would not that same person, who just turned off his JavaScript, not know how to turn it back on?

I try my best to make my pages accessible to everyone but sometimes it's just not possible to do that and get the desired effect. If that means that 3 people a year are not able to get the full experience of my pages then so be it.

Does it really matter? Should we care?

 

rocknbil




msg:3472967
 6:05 pm on Oct 9, 2007 (gmt 0)

For one, there is always the possibility a post may come up in a search out of context and even though you've heard it a million times, it may not be obvious to whoever finds it. There's nothing more annoying than finding a solution, spending hours getting it to work for you, then discovering it only works in IE, or your site requires accessibility and it fails.

As for why you should care - if your site is commercial in any way, and in the U.S., making it Javascript dependent immediately fails accessibility. Check out what's going on with Target. It's a big deal that can come back on you. When the lawyers get out their litigation sticks, the defendants might look to you to bear the load. "He/she did it, I paid them to do it right . . . "

Last, complacency allows a lot of developers to rely on Javascript for front end validation only which can pose serious issues if the validation isn't duplicated on the back end. This is still a pretty rampant problem.

Dabrowski




msg:3472995
 6:23 pm on Oct 9, 2007 (gmt 0)

I am on the fence with this one, I also agree that 99.99% of people don't know what it is, hence leave it on the default setting.

However rocknbil is right, no page should rely on JS to work properly. I find that <style> tags inside a <noscript> can easily make things permanently visible that would otherwise be hidden.

Apart from that, using the current techniques your script should be completely hidden, no more than 1 line of HTML! It should quietly attach itself to the page, to 'enhance' it's function, rather than being the function.

Fotiman




msg:3473010
 6:47 pm on Oct 9, 2007 (gmt 0)


Seriously, do we really have to specify in every thread that "your page will be inaccessible to those with JavaScript disabled"?

Often times, there are more than one ways to approach a scripting issue. You can take the quick and dirty approach, which often means inaccessible to those with JavaScript disabled. Or you could develop using Progressive Enhancement, using methods that are available to everyone (even those with JS disabled), and then "enhance" that using JavaScript to get a solution that behaves the same as the non-accessible method (but now users won't be blocked if they have JS disabled).


When's the last time you installed a browser that didn't have JavaScript enabled? That means that anyone hitting your page with JavaScript turned off is someone who manually went into his options and turned them off.

What about mobile devices? Do you know if those have JavaScript enabled? How about screen readers for blind users? Making an assumption that anyone who does not have JS enabled means they turned it off themselves is a bad assumption.


I try my best to make my pages accessible to everyone but sometimes it's just not possible to do that and get the desired effect.

With the advanced DOM capabilities today, there is very little that can't be done by starting with a more basic approach, accessible to everyone, and then enhancing that (either by totally replacing certain DOM elements or by modifying existing ones, etc.). In some cases the pure method might be more difficult to grasp, but I've never found an inaccessible method that couldn't be re-written to be accessible.


Does it really matter? Should we care?

I would say yes, you should care. As pointed out, Target is facing a lawsuit for refusing to make their website accessible. But not only that, Progressive Enhancement has really changed JavaScript development techniques. Instead of bucking that trend, I would suggest that you embrace it. You will be a better developer for it and it will look good on your resume. :) Why limit your visitors because you're not willing to apply more current techniques?

Trace




msg:3473015
 6:54 pm on Oct 9, 2007 (gmt 0)

For one, there is always the possibility a post may come up in a search out of context and even though you've heard it a million times, it may not be obvious to whoever finds it.

That's actually something I hadn't thought of and it makes a lot of sense, especially for these boards. It made me realize that my question in the first place was wrong. It shouldn't be why do we always specify that it won't work with JavaScript disabled rather why are we obligated to?

If you type "http://www.google.com" into NN1 you're going to get the following message;
No Viewer Configured for File Type: text/html

At some point down the line, HTML became the norm and we don't specify requirements on viewing HTML pages. When is it going to be the norm for JavaScript? Obviously everyone has a JavaScript capable browser... shouldn't that make it the norm?

Edit:
What about mobile devices? Do you know if those have JavaScript enabled? How about screen readers for blind users? Making an assumption that anyone who does not have JS enabled means they turned it off themselves is a bad assumption.

That's also a good point and again something I didn't think of. Another good reason to start a thread like this. :)

And about the whole Target thing... I haven't got a clue what you guys are talking about. Off to do some Googling.

[edited by: Trace at 6:58 pm (utc) on Oct. 9, 2007]

Dabrowski




msg:3473026
 7:16 pm on Oct 9, 2007 (gmt 0)

Ahhh Foti. I knew you'd reply to this one!

At some point down the line, HTML became the norm

It became a standard, and I believe JavaScript did too, and has evolved alongside HTML, but always designed to work in tandem with it, not replace it.

londrum




msg:3473062
 7:58 pm on Oct 9, 2007 (gmt 0)

there are other ways of blocking javascript without turning javascript off. security software routinely blocks it, for example. apparently it's turned off in banks and other such places, so those users wouldn't have any way to turn it back on.

zCat




msg:3473097
 8:22 pm on Oct 9, 2007 (gmt 0)

As for why you should care - if your site is commercial in any way, and in the U.S., making it Javascript dependent immediately fails accessibility.

So what happens if the site's core functionality depends on JavaScript, and is impossible to use without? Such as Google Maps, which needs JavaScript switched on to be able to view the maps. (Edit: OK, bad example, if you search for something, the map gets displayed as a static image).

[edited by: zCat at 8:26 pm (utc) on Oct. 9, 2007]

rocknbil




msg:3473257
 12:12 am on Oct 10, 2007 (gmt 0)

First, allow me to say my comments here, as always, are just shared recommendations of what I have learned over the years. Use them or not, it's your choice.

what happens if the site's core functionality depends on JavaScript?

IMO this would be bad, very bad. Commercially it could lead to litigation. Your example is a decent one, but not outside what I call the basic rule of Javascript: always provide alternate content. Javascript is used to enhance, not rely upon.

With G-maps it's easy, one way is to do a screenshot of the map

<div id="my_map"><img src="my_screenshot.gif"></div>

Then you use Javascript to write the map:

my_map.innerHTML=variable_holding_map;

The saving grace with G-maps is they're not really vital content and you would (should) probably have alternate content somewhere else on the page defining the location anyway.

I do not see any difference at all between these two statements:

"You must have Javascript enabled to use this web site."
"This web site is optimized for Internet Explorer version xyz."

If you look at it that way, it reveals the old rule, you shouldn't dictate the user's environment for them.

zCat




msg:3473588
 8:57 am on Oct 10, 2007 (gmt 0)

Hmm (just playing devil's advocate here) say I come up with an innovative commercial online application which can only work in Javascript and there's no conceivable way of realizing it in plain old HTML: what does the law say then?

For example: an online wordprocessor app, which wouldn't make any sense without a rich JS-based UI (unless you want to realise it using HTML forms, which is a bit ridiculous). Google Docs stops you at the start page with "Your browser must support javascript."

slef




msg:3473649
 11:25 am on Oct 10, 2007 (gmt 0)

Non-Javascript browsers are always going to exist.

Security has been mentioned above. Accessibility too (having page elements change themselves after display is a right pain for many users). The third and growing reason is power consumption: more people are using mobile devices with finite battery life and less processing on the browser means more battery life - that's a real incentive to limit or disable Javascript processing.

So what should authors do with a must-have-Javascript web application? Simply offer an alternative access route. Maybe it won't be as "slick" as the full-fat interface, but the core functionality should survive. For Google Docs, they allow uploads in some common formats IIRC, so I'm surprised if it requires Javascript, but it wouldn't be the first Google Bug.

Rosalind




msg:3473664
 11:50 am on Oct 10, 2007 (gmt 0)

In FireFox there are a bunch of settings that allow you to specify just what JS can and can't do, without switching it off altogether. Mainly these are to do with avoiding phishing by preventing hiding or changing the status bar. Go to Content > Enable Javascript > Advanced to see what else it does.

So if you're building things with Javascript, it's not just a question of whether or not it's off or on; these aspects may commonly be disabled as well.

gibbergibber




msg:3473763
 2:10 pm on Oct 10, 2007 (gmt 0)

--The third and growing reason is power consumption: more people are using mobile devices with finite battery life and less processing on the browser means more battery life - that's a real incentive to limit or disable Javascript processing.--

More and more mobile device browsers do support Javascript though (and flash too). It's not just in the highest end $500 - $1000 models but also in phones that can be bought for $200 new and unlocked. In 5 years time I'd expect most phone models to support Javascript.

Having used these kinds of devices for some time, I can't say that javascript being on or off makes any noticeable difference to battery life.

explorador




msg:3473814
 2:59 pm on Oct 10, 2007 (gmt 0)

Does it really matter? Should we care?
YES WE SHOULD

Besides what we all know is useful, very often, javascript on a webpage means "something that moves, something hidden that the user makes visible by clicking on something, turning layers on or off and so on..."

Some people just don't get it... Designing with a "less js is better" attitude gives you less problems even with those javascript enabled browsers as very often (please read twice) the user is the problem, the interaction.

Example:

"I cant find how to change my settings". Ok, is under "MY ACCOUNT", and "SETTINGS", but, as is a interactive menu, some people (a lot) just cant click on it. Some markets have more users like this than others. So, sometimes having JS or not is NOT the problem, but the freedom of "tricky" interaction we, or the client want.

Ok, some people in my case complain about some "usability" simplicity, as the design looks too simple showing almost every link on a menu... but I reduced A LOT the number of emails asking "where is..." "how can I..."

Some ajax apps are a pain.... on the back button of the browser... and showing always the same page with changing content...

mjwalshe




msg:3473839
 3:13 pm on Oct 10, 2007 (gmt 0)

don't forget the google bot does not have javascript so bad use of javascript and/or ajax can kill you for search.

jam2005




msg:3473904
 4:01 pm on Oct 10, 2007 (gmt 0)

My stats show that 99.99% of the visitors to my websites in the last year had JavaScript enabled in their browers. I think it's pretty safe to assume that the vast majority of people will be able to access the features on your site if they use JavaScript.

slef




msg:3473939
 4:21 pm on Oct 10, 2007 (gmt 0)

Small note of caution on the "99.99% of cats have Javascript" comment: beware your stats package doesn't require Javascript and/or graphics support, else the results can be very misleading. Also, a simple Javascript-enabled flag doesn't tell you what parts of it are enabled and disabled.

Gibble




msg:3473942
 4:23 pm on Oct 10, 2007 (gmt 0)

And some of those stat packages check if the browser is JS capable, not necessarily enabled.

lexipixel




msg:3474035
 5:43 pm on Oct 10, 2007 (gmt 0)

We must all immediately check our websites and make sure that people with TTY output, Mono-herc and other limited pallette graphic display and all other devices capable of reproducing data in fixed form may access our data, further, all data must pass validation established by Google, Inc.

Further still; we must insure that all data transmits and displays in reasonable time and manner for those using Morse Code encoded telegraph transmission and 300bps cradle modems and that transmission can be established by devices using non-touch-tone clicks. The doctrine of "Knock Three Times on the Ceiling, Twice on the Pipe" shall be the lowest acceptable denominator.

We must also make sure that every bit of text is available in all languages known to man. In cases where the interchange of language is only accomplished via visual signals, audible sounds, scratches on stones, trees or other non-standardized character based language elements, reasonable effort must be made to provide translation services.

All ecommerce capabilities must be able to accurately calculate exchange rates from all known currencies, and in the case where bartering is the norm, we must establish a rate for exchange of beads, livestock, unmarried offspring, land or indentured servitude.

Shipping rates must be available to any point on the globe, and by all common carriers indigenous to the buyer's region. In cases where, for example a package may travel by mule, carrier pigeon or other beast of burden, disclaimers regarding dependency on the animals health, season of year and breeding status must be taken into account.

All methods employed by site must pass stringent spidering, crawling, ranking and algorythmic changes established solely by Google, Inc., and all such methods must be kept up-to-date with all changes established by Google whether by internal company memo, public announcement, or other means public or private.

Failure to comply with any of these mandates may result in system operators being sued for monetary damages due
those for whom accessibility has been denied, or removal from the internet solely at the discretion of Google, Inc.

You have been warned!

explorador




msg:3474042
 5:53 pm on Oct 10, 2007 (gmt 0)

I read somewhere something like "if you want more reach, try to design for most of the people".

In my "market" and with my competitors I see prizes very often to sites with JS, AJAX, and so on... ok, fabulous... now check their rankings, link depth already on SE, reach, stats, how many people stay there on the site and how much actually say "wow, thats useful I will bookmark it" instead of "what a nice tricks and movements" (and close).

what a shame.

swa66




msg:3474048
 5:55 pm on Oct 10, 2007 (gmt 0)

Javascript is disabled by more browsers than most webmasters think.
There are add-ons like NoScript to allow users to deny it by default and getting the right what is essentially run code on their computer will be hard from those visitors.
Also NoScript changes the behavior of the <noscript> tagadn disallows redirecting to other pages (as it's (ab)used by webmaster to send the visitors away from their pages to irrelevant error messages)

Many web based attacks nowadays are in the form of javascript, either directly in the html, or via a downloaded intermediary media such as flash, movies etc.

If it doesn;t appeal with javascript off, forget the visitor that has javascript off, there are plenty of competitors who will cater to the visitor anyway. (Only industry that should not worry yet are airlines, all of them succeed in making miserable sites without javascript.

victor




msg:3474127
 7:39 pm on Oct 10, 2007 (gmt 0)

w3schools' stats show around 10% of users have javascript disabled.

Though that figure will obviously vary by market.

If, say, you estimate/calculate that 3% of your market will have Javascript disabled, then you can do some simple what-ifs on that number.

It is not as simple as thinking you are losing 3% of your potential visitors. You are losing 3% of the entire market which is a much larger figure.

(Try a thought experiment. You have 99 competitors and you all expect to take 1% of the market. Except only one of them has a site that also works Javascript-free. That one takes 3% of the market unchallenged: over three times as much as the rest of you. Can you afford to be that generous?)

And that is, as already stated by other posters, if your site is even findable. If spiders can't navigate the site fully, you'll do proportionately less well in search engines.

slef




msg:3474135
 7:51 pm on Oct 10, 2007 (gmt 0)

lexipixel wrote "make sure that people with TTY output, Mono-herc and other limited pallette graphic display" - hopefully that was in jest, but you should try to avoid obstructing people who have colour-blindness or contrast perception impairment.

A couple of weeks ago I saw a site which used near-identical red/green indicators in the same position for a yes/no response, with unhelpful tooltips - only the colour changed. Let's just hope that sort of web designer doesn't ever move into traffic light design... do web 2.0 designers study other design work like older webmasters did, or are all old design ideas irrelevant because, hey, it's web 2.0?

amznVibe




msg:3474470
 2:48 am on Oct 11, 2007 (gmt 0)

Just like there are designers that insist on making 100% Flash based sites, there will be designer that make 100% AJAX sites. However those that are sane will always make a fallback to non-flash, non-ajax technologies.

It's not that difficult to make non-ajax fallbacks if you know what you are doing. However if you are addicted to using other people's code that doesn't have that ability, well then you are stuck, aren't you.


lexipixel




msg:3474494
 4:09 am on Oct 11, 2007 (gmt 0)


lexipixel wrote "make sure that people with TTY output, Mono-herc and other limited pallette graphic display" - hopefully that was in jest..."
-slef

Of course it was, (in jest --- somewhat)...

A year ago I wouldn't design a site that could not be viewed on 640x480 display, and I would only use JS for non-critical elements of the site.

JS is useful, and 90%+ of browsers can handle it now, (most users at significantly higher than 640x480).

Unlike others who insist on 100% accessibility, I shoot for 90%. There is no such thing as "100% accessible", no matter how hard you try -- the day after you finish coding, a new device, protocol, "standard" or other element of web design will fall into fashion, and some of those people will not be able to [see/hear/use/access] the site you "finished" yesterday.

Yes, you can stay up coding 18 hours a day, attempting to please all of the people all of the time -- but you are rowing against the tide.

I would rather have 90% usability -- with rich features, ease of use, simplified coding and processes and anything else I can gain for those 90% -- the competition is welcome to cater to the 10% who are non-standard.

BTW - I have immediate family members with severe disability, so the politically correct "everything needs to pass ADA" crowd get no mileage from me. My brother is a hemi-plegic (paralyzed over 50% of his body -- inside and out), and has been for 20 years. When he first became disabled he wanted me to install grab-bars up and down the walls of the entire house. My logic said: If I give him these "crutches" to lean on, he will not fit in with every day life since there are no grab bars in most places.

Javascript disabled -- I don't care either, if the JS code makes the online experience better for 90% of the people 90% of the time.

Trace




msg:3474890
 2:19 pm on Oct 11, 2007 (gmt 0)

As do designers, at some point you need to realize that you just can't satisfy every one. Designers have to make a decision when they start a new project; do we aim for IE4+ & NN4+ sacrificing design for compatibility or do we set the bar a little higher and go for IE6+ & FX1.5+ and get the best user experience from our product.

Same with screen resolutions, do we cater to everyone and design for 640x480 - or do we better satisfy the other 99% and get a better product out? (or in lexipixels case, a 3x3 stone tablet and a chisel)

Again, the same can be said in this case, do we lower the quality of our product for everyone so that 1% of people can access our information? I still believe this is ridiculous. It makes absolutely no sense to lower our standards to satisfy that 1 in a hundred and make the other 99 miserable.

So my competitors can take that 1% of my business with my blessings and I hope they do well with it. I'll be sitting on a beach drinking a Margarita with the money I'll be making from the 99% of the business that I have a firm grasp on.

sgietz




msg:3474893
 2:22 pm on Oct 11, 2007 (gmt 0)

Boy am I glad that people can't turn off HTML in their browsers :o)

There has to come a point when we have to make the painful transition to new technologies. AJAX, for example, has been attacked for various reasons. Sure, I have been annoyed by the "back button" issue that arises on AJAX sites, but that's just habit and old habits die hard.

We should rethink the web and how it functions. AJAX type sites will be the future. You will see a lot more pages that will function like applications, such as Google Apps. It takes some getting used to, but it's clearly where we're headed. We don't use floppies anymore (yea, some of you do ... some people still have outhouses). No more VHS, welcome DVDs ... umm wait, I mean HD-DVD, or is it Blu-ray? Hmm! ;o)

Anyways, we can't wait to progress until every Plain Jane and Joe Schmo catches up to 2007 ... and yes, TVs can now show programs in color.

Will be painful, yes. Will be losing some customers, perhaps. Will be prepared for the future, you betcha. Just hurt a lot of people's feeling with this message, boy, don't I know it.

Umm, no ma'am, we don't use the telegraph anymore. But you can have this really cool iPhone ;o)

robho




msg:3475009
 4:04 pm on Oct 11, 2007 (gmt 0)

There has to come a point when we have to make the painful transition to new technologies

Agreed, but that doesn't always mean bigger, more colors, more animation.

A significant part of the growth in browsing over the next 5 years is going to come from mobile devices. Even basic phones have web browsers now - and they're being used, especially in high-growth areas in the third world without landlines/ISPs.

So keeping up with new technologies can mean making sure the site is simple anough to be usable on such devices, rather than adding more of everything.

Simple design is much harder than complicated design. But lasts better.

gabrielk




msg:3475225
 7:05 pm on Oct 11, 2007 (gmt 0)

One of the websites I help maintain receives 95,000 visitors a month. Our analytics software estimates 6% of those visitors have Javascript disabled. That's 5,700 visitors each month who would find out website inaccessible if we didn't have javascript-disabled fallbacks in place. (And I won't derail this by mentioning the number of those who have images disabled!)

So these people with Javascript disabled are indeed real, and they're part of every demographic. Maybe it's redundant to mention it in every thread, but maybe someone who doesn't already know will be reading that for the first time.

Although Javascript is installed and enabled by default in any modern browser, that's not the issue. The issue is that users purposefully disable javascript in their browsers, and it's your call if you want to make your site inaccessible to them. We're not just talking about people with disabilities either -- there's a very, very large number of security breaches a malicious site or a badly coded site can incur thanks to Javascript. Nearly all the MySpace hacks I've read have been exploits on MySpace's javascript code. And there's an absolutely obscene amount of information people can gather about you and your computer through Javascript on the web, such as your complete browsing history and what programs you have installed.

Of course, as a javascript programmer who's annoyed with people saying "your page will be inaccessible to those with JavaScript disabled" you already know all of the above. And as a savvy web developer you know it's just lazy and bad programming to create a site that relies on things you can't control (i.e., whether JS is enabled/disabled) without some sort of fallback. So I suppose I'm just here to preach to the choir. :)

lexipixel




msg:3475227
 7:09 pm on Oct 11, 2007 (gmt 0)


"...AJAX type sites will be the future..."
-sgietz

As I said, I avoided JS and only used it for simple one-lines that could do something I could not easily do any other way -- and only "things" that would not detract from the experience if JS was not available on the user's end.

Since AJAX depended on JS and I also considered AJAX too complex to code (not "difficult", just requiring too many disciplines, (HTML, JS, CSS, DOM and a back-end scripting language), I avoided it also.

This year I embraced both.

The best argument I saw for using AJAX was a simple link on an eBay page. For years, I would do complex searches on eBay and save them as "Favorite Searches".

To save a search required:

1. click the "Save this search" link
2. be taken to a separate page with options, (e.g.- recieve emails when new items matches the search, give the search an easy to remember name, add a note).
3. After saving, I was taken to "My eBay" searches page where I would click the newly created search to get back to where I was before step 1.

One day, I hovered my mouse over the "Save this search" link -- deciding if I should save it or not....

After a few seconds, a CSS hidden div appeared with the form to save the search -- I completed the form, clicked save, and the div disappeared.

Not only had my user experience been greatly improved, but eBay just saved thousands of bytes of data transmission by not having to display (4) complete pages. (And the "Back button" issue made no difference at all -- in fact, I was glad that it still brought me back to the page I was on previous to saving the search).

As a programmer, (and someone who used to write a lot of offline ".EXE" type applications), I find it simple to pop an Ajax window open and display a small bit of data, rather than repaint the entire screen and interrupt the application flow -- the bandwidth reduction is just icing on the cake.

..also on the AJAX "Back Button" issue -- if you watch average users interaction with a browser, you'll find many don't use the [BACK] button at all -- they expect to find all navigation on-site and in the viewport.

This 53 message thread spans 2 pages: 53 ( [1] 2 > >
Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved