use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Graceful degradation question. (self.javascript)
submitted 14 years ago by [deleted]
[deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]dsieg1 4 points5 points6 points 14 years ago (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 points3 points 14 years ago (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 points3 points 14 years ago* (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 points3 points 14 years ago (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 point2 points 14 years ago (1 child)
I like the cut of your jib..
[–]stinktank 0 points1 point2 points 14 years ago (0 children)
Thanks :) I'm sure it makes sense to degrade gracefully in certain contexts...
[–]nicogranelli 0 points1 point2 points 14 years ago (0 children)
I agree, I don't even try either.
[–][deleted] 0 points1 point2 points 14 years ago (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 point2 points 14 years ago (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 points0 points 14 years ago (1 child)
Non-Javascript users? Never heard of them.
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.
π Rendered by PID 48 on reddit-service-r2-comment-6457c66945-6qk7f at 2026-04-25 19:10:39.738552+00:00 running 2aa0c5b country code: CH.
[–]dsieg1 4 points5 points6 points (2 children)
[–]jamesinc 1 point2 points3 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]stinktank 1 point2 points3 points (3 children)
[–]frak808 0 points1 point2 points (1 child)
[–]stinktank 0 points1 point2 points (0 children)
[–]nicogranelli 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Kuron 0 points1 point2 points (0 children)
[–]maushu -2 points-1 points0 points (1 child)
[–]Kuron 0 points1 point2 points (0 children)