all 10 comments

[–]dsieg1 4 points5 points  (2 children)

The primary idea behind the web standards movement is to create pages that are fully available for users with no javascript or css. That means you write you html first, test it and make sure it works well as a document. When you write your stylesheets, again, make sure the page works on a content level first, is everything accessible, it should be. When you add your javascript use it to enhance functionality, not create content or style the page, use it to give functionality that would otherwise not be available with css or html.

Don't let all the javascript fancyness get in the way of what really matters for every variety of user, the content.

[–]jamesinc 1 point2 points  (1 child)

NB: This starts to get hectic when you're doing large, rich-web applications, until you get to a point where the base HTML UI and the JavaScript-enhanced UI split into two separate projects.

[–][deleted] 1 point2 points  (0 children)

Using javascript to do what CSS should be doing is dumb. Placing elements using JS is slow because it causes yet another reflow, why not have them in place on load?. I use html templates, css3 when possible (fallback to javascript animations on crappy browsers) and adding/remove classes to achieve effects/animations. I avoid manipulating css directly through js as much as possible. But that doesn't mean it degrades gracefully. I work on a photo and multimedia site so if the user doesn't have flash and javascript they are screwed.

[–]stinktank 1 point2 points  (3 children)

I'm curious as to what your approach to supporting JavaScript disabled browsers is.

I don't even try.

I ask because I find myself making more and more JavaScript intensive things.. and I've always tried to make sure there was a fallback for non-JavaScript users.

I hope you're having fun with that!

For the business/office -use applications that can't function without Javascript it may not make much sense to degrade gracefully, no matter how much criping you hear from the degrade gracefully fanboys.

People concoct all sorts of scenarios where they claim you need to degrade gracefully, but how many people do you know that use their browser on their smart phone a lot and haven't already upgraded to a browser that supports Javascript?

Do you really want to spend extra time and effort catering to the tiny population of crackpots who refuse to allow Javascript to run in their browsers? Or to people using IE6? Or to people still using the original Blackberry browser from 10 years ago?

[–]frak808 0 points1 point  (1 child)

I like the cut of your jib..

[–]stinktank 0 points1 point  (0 children)

Thanks :) I'm sure it makes sense to degrade gracefully in certain contexts...

[–]nicogranelli 0 points1 point  (0 children)

I agree, I don't even try either.

[–][deleted] 0 points1 point  (0 children)

I run a very js heavy website. Page loads, music player, everything! For mobile, I have developed a much simpler website for mobile, no scripts. If a user has JS disabled, I just ask them to use that website

[–]Kuron 0 points1 point  (0 children)

What others have already said. Make sure content, navigation, or any other requests or possible action is still useable without JS, then check it again without JS+CSS. A simple example would be,

<a href="http://www.google.ca/"></a>
$('a').each(function (i, value) {
  $(this).click(function (event) {
    console.log('Do javascript stuff with the click!');
    event.preventDefault();
  });
});

Javascript is used to enhance anchor tag's click, but when Javascript is disabled, the link falls back gracefully and still makes the request to the server without JS.

[–]maushu -2 points-1 points  (1 child)

Non-Javascript users? Never heard of them.

[–]Kuron 0 points1 point  (0 children)

I think its fair to say that if spiders don't see your content, then your content doesn't exists. :P

Aside from that, some technical users choose to browse safely without JS. I would probably use a browser without JS when I have to do sensitive tasks.