To JS or not to JS...

  • (2 Pages)
  • +
  • 1
  • 2

16 Replies - 8685 Views - Last Post: 21 March 2013 - 10:24 PM

#1 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 8363
  • View blog
  • Posts: 31,052
  • Joined: 12-June 08

To JS or not to JS...

Post icon  Posted 10 March 2013 - 10:32 PM

*
POPULAR

A buddy of mine and I were discussing website building while downing some pints of Lucky Bucket the other night... The conversation turned to "should I give a rats patoot about the 3% of people who disable javascript when dipping into the joys of jquery and yui controls, or do I tell'em to eat a fudgicile?".

We bounced ideas around in terms of SEO (bleh), read ability for disabled folk, keeping up with versions, and mobile... the crux comes down to he wants to do all these nifty javascript manipulation of his site with the faster javascript, or try and hunt down CSS hacks. His example kept coming back to 'menus' as his example; dynamic drop down menus.

The site he has in mind is a custom CMS-ish site.. the DB holding most of the bulk of the content, that being pulled by php, and js doing fancy manipulations.

The conversation moved on afterwards (with no definitive answer outside of general feeling that it should be looked into) , but I am curious how many folks take the 'no js' into count when making a site? Is it worth trying to create a 'feature robust' site sans js? Sure keeping most of the page functioning is great, but all that time saved and access to fancy namespaces is hard to avoid.

Is This A Good Question/Topic? 5
  • +

Replies To: To JS or not to JS...

#2 Takk  Icon User is offline

  • D.I.C Head

Reputation: 40
  • View blog
  • Posts: 110
  • Joined: 08-March 13

Re: To JS or not to JS...

Posted 10 March 2013 - 11:42 PM

Simply put, I think it's important for developers to be aware of noscript cases and make exceptions for these, but not so much as far as the bells and whistles go. Of course go to great lengths to ensure functionality but not so far as to substantially increase the development time of any given project or product unless it is absolutely necessary.

At the same time, I strongly believe it is the responsibility of the developer to ensure that their users are protected as much as possible against any sort of attacks that turning off Javascript is suggested to aide in avoiding.

I like to add a small highlighted div at the top of JS intensive pages in a noscript tag that atleast informs the user that the site was designed with javascript support in mind, and that they may notice a degredated experience blah blah. This mostly because a number of users who aren't particularly computer savvy may not realize that they have disabled features in their browsers, or may have even turned them off due to some sort of security notification from god knows where, and honestly if I can trigger someone into a search to learn more about what this message may mean and further their knowledge, I've done at least a small favor for other developers who will have not included a notice and who's site will suffer greatly when these features have been turned off.

None the less, as far as menu's go, like I say, go to great lengths to ensure that your site is accessible without javascript. Be it by offering noscript text links in your site navigation, and on those pages a form of navigation to access sub pages etc., but a knowledgeable user who has javascript disabled is likely to understand that they are doing so at the expense of a possibly feature rich experience. They may even have js disabled because they are looking to cut a lot of the new age UI stuff out, personally I would rather a few extra clicks on a basic UI as opposed to a buggy dropdown menu which hides items behind divs which are not placed correctly or what have you.

As far as screen readers go, I'm a big supporter of the continued efforts to get computers and the internet into the hands of disabled users, but with some common sense attached to it also. This really goes as per your content and target audience, I wouldn't break my neck to build a fan site for a video game with an abundance of LONGDESC, AXIS, SKIP or SUMMARY tags, but if I was building a site with any type of research articles, news, or even a blog site which I expected this user base to enjoy, I would seriously consider adding them.

All and all, I think it comes down to just a few points, your target audience (elderly or inexperienced users may run into issues when things move too fast on your UI), how much time you have for development, your project budget (time is money and the client will need to pay for extra tagging, copywriting, and conditional features that come with extensive disabled user access and usability alternatives), and also technological requirements in general, sometimes there just isn't another way to do what you can do with javascript, and you'll have to decide in some cases if it's worth not adding a certain piece of breakthrough functionality to cater to the generally small percentage of users who are actively browsing without javascript enabled.

So to call it quits, I think building for your target audience is the most important aspect of any project or product, people love bells and whistles, but only when its fitting, and never when doing without it means you lose the general functionality of your work. My goodness do I love in-house projects and straight forward browser requirements :)
Was This Post Helpful? 1
  • +
  • -

#3 calvinthedestroyer  Icon User is offline

  • D.I.C Lover

Reputation: 166
  • View blog
  • Posts: 1,904
  • Joined: 13-October 07

Re: To JS or not to JS...

Posted 11 March 2013 - 01:51 AM

My site has some js on it, I could not find any other way on how to do that, nor could anyone else that I asked. So, javascript it is.

Some of the worst restrictions that I've seen:
1>Just tables, vague descriptions and no pictures on sites that I need to order parts from..
2>Active X, who knows what the heck that's going to do.
3>PDFs! yes, webpage that leads you to a pdf file when you expected a webpage
4>Abobe flash! I've seen webpages that require you to have (the latest) abobe flash.
5>A picture, the web site was just a picture scanned in as a gif.

Oh and 404's, nothing like a good 404 when there is something that you really need!

Needless to say, I kept the JS to just the slide show.
Was This Post Helpful? 0
  • +
  • -

#4 baavgai  Icon User is offline

  • Dreaming Coder
  • member icon

Reputation: 5641
  • View blog
  • Posts: 12,357
  • Joined: 16-October 07

Re: To JS or not to JS...

Posted 11 March 2013 - 04:12 AM

Two words: degrade gracefully.

A visitor should at least know that there is a site there and that it could look a lot better with JS. Indeed, that it may rather suck without JS. The visitor should at least be told rather than be greeted by some unconsidered mess.

View Postmodi123_1, on 11 March 2013 - 12:32 AM, said:

Is it worth trying to create a 'feature robust' site sans js?


You can't. Web pages are web pages. They're just pages. You can do some CSS tricks, but it's still just a page.

You can embed crap like Flash, Java, etc, but now you've honestly made things worse.

To be honest, feature robust usually means, to me, accessibly poor. A simple page can be read from anything. The page that rocks your world on a full sized monitor often makes you think of dead kittens on a mobile device.
Was This Post Helpful? 2
  • +
  • -

#5 Programmist  Icon User is offline

  • CTO
  • member icon

Reputation: 251
  • View blog
  • Posts: 1,833
  • Joined: 02-January 06

Re: To JS or not to JS...

Posted 11 March 2013 - 09:55 AM

I've worked on several sites for very large corporations. Many of the recent ones (past 3 years) didn't work for those with Javascript disabled. I'm not saying it's right or wrong, but it was a deliberate business decision. The prevailing attitude I've seen when consulting with these organizations is that the amount of work required to create a site that would degrade gracefully is not worth the cost for such a tiny percentage of visitors. If that percentage grew it might change the decision. The customer gets a message informing them of the issue and they can add x.com to their "white list." I've also seen some of them make the same decision regarding older versions of IE.
Was This Post Helpful? 0
  • +
  • -

#6 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7283
  • View blog
  • Posts: 12,079
  • Joined: 19-March 11

Re: To JS or not to JS...

Posted 11 March 2013 - 11:17 AM

In the real world of scarce resources, these decisions are always triaged, and there are so many factors to consider, it's just silly to try to present this as a simple one-size-fits-all decision.

What are the costs of providing this data in some format other than your default? What are the costs of not doing it?
Evaluate those numbers and you have a basis for an answer. This is really a question for the marketing side of the house, if you're doing a commercial site. For your own site, you can do what you want, which is probably not making an HTML-and-CSS version of your majestic creation.
Was This Post Helpful? 2
  • +
  • -

#7 Programmist  Icon User is offline

  • CTO
  • member icon

Reputation: 251
  • View blog
  • Posts: 1,833
  • Joined: 02-January 06

Re: To JS or not to JS...

Posted 11 March 2013 - 12:12 PM

@jon.kiparsky - Who's post are you replying to?
Was This Post Helpful? 0
  • +
  • -

#8 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7283
  • View blog
  • Posts: 12,079
  • Joined: 19-March 11

Re: To JS or not to JS...

Posted 11 March 2013 - 12:16 PM

To the original question
Was This Post Helpful? 0
  • +
  • -

#9 laytonsdad  Icon User is online

  • Cheese and Sprinkles
  • member icon

Reputation: 400
  • View blog
  • Posts: 1,710
  • Joined: 30-April 10

Re: To JS or not to JS...

Posted 11 March 2013 - 12:36 PM

Quote

To JS or Not To JS?


This brings more questions to mind,

What kind of site is it? What will the JS be used for? Is it necessarily? Will it cause problems with functionality if the user has Javascript turned off? ... and many more.

In my opinion, this question is very vague. There is so much more involved with deciding if Javascript should be used or not. In the year 2000 this may have received a resounding "no" from a forum, now I feel it less of a problem, as the majority of internet users are OK with Javascript or have no idea what it is or any stigma against it.

The main question that plagues me is, what will the Javascript be used for? If it is to used for functionality it could be up for debate. If it will be for design of the UI, I say use it and make sure the uer can still use the site (although blah) to get what they are trying to get done, done. For me functionality is a major part of web development and I like my site to work no matter what.

Just my opinion... :sweatdrop:
Was This Post Helpful? 0
  • +
  • -

#10 Lemur  Icon User is offline

  • Pragmatism over Dogma
  • member icon



Reputation: 1335
  • View blog
  • Posts: 3,398
  • Joined: 28-November 09

Re: To JS or not to JS...

Posted 11 March 2013 - 05:56 PM

Javascript is icing. The test to use against any web site is to first disable everything but the HTML. Is it still readable, understandable, and in a concise order? Then enable the CSS. Does it still make sense? THEN you can touch javascript.

Don't rely on it. It's another element, not THE element.
Was This Post Helpful? 2
  • +
  • -

#11 AVReidy  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 65
  • View blog
  • Posts: 431
  • Joined: 17-February 11

Re: To JS or not to JS...

Posted 11 March 2013 - 06:51 PM

Quote

Don't rely on it. It's another element, not THE element.


It's quickly becoming THE element in the modern Web. And that's a good thing: It will hopefully replace flash and Java applets entirely.

Of course, it's stupid to make a blog dependent on it, but if you make a web application that relies heavily on Javascript (as it should), you shouldn't feel compelled to waste your time doing anything more excessive than notifying those 3% who disable JS that "This site requires Javascript." It's really all you can do without resorting to another technology. For all practical purposes, HTML is static.

Does anyone know why these users disable JS? Is it a conscious choice, or are they the people stuck on some outdated version of IE that suggests disablement?
Was This Post Helpful? 1
  • +
  • -

#12 laytonsdad  Icon User is online

  • Cheese and Sprinkles
  • member icon

Reputation: 400
  • View blog
  • Posts: 1,710
  • Joined: 30-April 10

Re: To JS or not to JS...

Posted 11 March 2013 - 07:33 PM

View PostAVReidy, on 11 March 2013 - 06:51 PM, said:

Does anyone know why these users disable JS? Is it a conscious choice, or are they the people stuck on some outdated version of IE that suggests disablement?


What I remember is instructors and forums saying "Javascript is client based, that means people can steal your personal information" in early 2000's.
Some businesses I know disable JS on there workstations for the above mentioned reasons.

This post has been edited by laytonsdad: 11 March 2013 - 07:33 PM

Was This Post Helpful? 0
  • +
  • -

#13 Lemur  Icon User is offline

  • Pragmatism over Dogma
  • member icon



Reputation: 1335
  • View blog
  • Posts: 3,398
  • Joined: 28-November 09

Re: To JS or not to JS...

Posted 11 March 2013 - 07:58 PM

Just as Flash and Java are stupid to focus an entire site around, so is javascript. If you're building with a single set of js features in mind you're doing it completely wrong.
Was This Post Helpful? 0
  • +
  • -

#14 Sergio Tapia  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1251
  • View blog
  • Posts: 4,168
  • Joined: 27-January 10

Re: To JS or not to JS...

Posted 12 March 2013 - 12:44 PM

View PostLemur, on 11 March 2013 - 08:56 PM, said:

Javascript is icing. The test to use against any web site is to first disable everything but the HTML. Is it still readable, understandable, and in a concise order? Then enable the CSS. Does it still make sense? THEN you can touch javascript.

Don't rely on it. It's another element, not THE element.


In a perfect world where you have 2 years to build a website maybe.
Was This Post Helpful? 0
  • +
  • -

#15 Lemur  Icon User is offline

  • Pragmatism over Dogma
  • member icon



Reputation: 1335
  • View blog
  • Posts: 3,398
  • Joined: 28-November 09

Re: To JS or not to JS...

Posted 12 March 2013 - 06:42 PM

View PostSergio Tapia, on 12 March 2013 - 02:44 PM, said:

View PostLemur, on 11 March 2013 - 08:56 PM, said:

Javascript is icing. The test to use against any web site is to first disable everything but the HTML. Is it still readable, understandable, and in a concise order? Then enable the CSS. Does it still make sense? THEN you can touch javascript.

Don't rely on it. It's another element, not THE element.


In a perfect world where you have 2 years to build a website maybe.


Funny. If you do it right it takes less time. My entire portfolio uses nothing but HTML and CSS, no images or Jacascript and it works quite well for itself considering it was done in about 4 hours....

The point of that is you need to get the important things done first, then add frills. A quick hierarchy of web elements:

1. Content - Content is king, period. You need to build to suit your content, or the site will fail.
2. Layout - Structure of the page, grids, and otherwise.
3. Design - Images, font choices, colors
4. Javascript - jQuery or whatever other effects

Server side code can be either before layout or after design. Depends on the person and the team really.
Was This Post Helpful? 1
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2