Grow your CSS skills. Land your dream job.

How often should I be using Javascript?

  • NIX
    # June 27, 2013 at 7:21 pm

    I’ve always built every site in HTML, CSS, and PHP. For me, that’s usually plenty. I don’t incorporate any web apps or anything like that. I generally just need to manage content and have an email form. For any stylistic pop, I generally find that CSS3 does the trick with whatever transitions or animations I might want, etc. And I use PHP to validate forms client side.

    However, I do wonder… should I be using Javascript? My reluctance toward Javascript has been all the SUUUUUPER slow and bloated sites that use excessive Javascript. I guess that’s more of an endictment on the devs than the language but still. Then there is the fact that Javascript isn’t indexed. This worries me.

    But a lot of times I’ll be trying to figure out how to do something and someone will suggest some jQuery plugin that already does it. It’s REAAAALLY tempting to take advantage of all these but is it always the right solution?

    I’m just reluctant to use Javascript on elements that are central to the site because Javascript is not guaranteed to be on the device viewing the site.

    Thoughts? Should I fully learn it and when should I use it?

    # June 27, 2013 at 7:29 pm

    For me, JavaScript is used when HTML+CSS can’t achieve what I want to do, though I try to keep it as minimal as possible.

    # June 27, 2013 at 7:40 pm

    Whenever I’m working on any project I’ll make sure that JavaScript is non-obtrusive, meaning that, if it’s disabled I’ll still have access to the information. I think the number of users who don’t have JavaScript enabled either disable it on purpose so the experience they’re getting, to them is acceptable… while others might not even know what JavaScript is or is it enabled/disabled. So it becomes a balancing act. It’s just the nature of the beast, some users will fall trough the cracks. Best thing you can do is look at any visitor data if available, then go from there. If you build with progressive enhancement in mind, that means your site will also degrade gracefully. Modernizr is a great tool to test for browser features and if JS is not available just hook into `.no-js` class and provide appropriate experience.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".