Payday loans

Why JavaScript Sucks

Writing by Nick Stamoulis

I’ve seen all kinds of websites. The worst kinds of websites in the world are websites that sit on Windows servers, designed using ASP, and use Javascript dynamic navigation menus. Why even build a website? It’s a combination of three of the worst design mistakes you can make.

Like anything made by Microsoft, Windows servers are loaded with code. You’ll typically find that many web hosts will offer a free website building tool with your hosting package. A great deal many of those are Windows-based. They suck. Don’t use them. Your website will be littered with code, making it difficult for the search engines to find the meat of your content so that they can index it properly. You are much better off using a LINUX or UNIX server. When interviewing your web host, ask them if their servers are LINUX or Windows-based. If they say Windows then shop elsewhere.

Windows servers and ASP go hand in hand. Why? Because they are both Microsoft products. If you guessed that ASP is littered with code that bogs down your website, you’d be right. Just like the Windows server, it’s got all kinds of useless code added in that makes it more difficult for the search engines to crawl your website. Build your website in HTML. It will get crawled better and will be more likely to get indexed by the search engines.

Javascript has some useful applications. There are things you can do on a website that will be difficult to do without Javascript, or that you wouldn’t even want to try without it. Embedding audio and video files, for instance. So Javascript is a great tool to use. But not as a navigation menu item. Why? Because the search engines can’t crawl it – yet.

There are other cool things you can do with Javascript. Most social applications use it. Without Javascript you couldn’t put all those widgets on your website. It’s a really, really cool coding language that has allowed webmasters to move beyond the basic formatting of HTML and into the world of Web 2.0, making user interaction one the defining principle of post-Bust Internet marketing.

So why is Javascript so bad?

The answer is it is only bad for certain use, namely, as a navigation menu. Yes, your navigation menu will look cool and your users will love the flips, turns, drop downs, flashing giggles, and other bells and whistles you embed into your website, but the search engines won’t crawl those links and your internal web pages won’t get indexed. And that’s why I recommend, instead, that you use an HTML navigation menu, because the search engines have no problem crawling HTML links.

One alternative, if you insist on using the dynamic Javascript navigation menu, is to place HTML links in the footer of your website so that the search engines have something to crawl. Otherwise, you’re really just building a website that looks pretty, but only you and your web host will know it.

4 Responses to “Why JavaScript Sucks”

  • Neal G says:

    I fail to see any relationship between ASP and SEO/a bad site. The server side code has little to do with the quality of a website.

    ” you guessed that ASP is littered with code that bogs down your website, you’d be right. Just like the Windows server, it’s got all kinds of useless code added in that makes it more difficult for the search engines to crawl your website. Build your website in HTML. It will get crawled better and will be more likely to get indexed by the search engines.”

    ASP is not HTML. You can output HTML with ASP but that statement makes no sense. When you said “Build your website in HTML” i think you meant to say php, jsp or some variant.

  • Chris McElroy aka NameCritic says:

    The poster is obviously talking about using javascript in the code for the nav menu rather than putting the code into an external file and calling it from the code.

    In that case, the poster is absolutely correct.

    A lot of people, including me, do not recommend windows servers. There are good reasons for that. If windows servers are so great, why do you have to use a LAMP to make things work on it?

  • Ryan says:

    This article focuses solely on using javascript for menus as a bad option. While that maybe true, there are more reasons than just using it for menus that javascript is bad in general. For one it’s way too forgiving. While, I realize there was some intent there, but it increases coding time playing around with it. It’s also a non-standard “standard”. Meaning, it does technically have a standard to follow. But implementers implement things anyway they feel like. So you can never be guaranteed anything will work the way you think it should. Even between versions of web browsers. Granted, I suppose that can be said about for most languages. Look at C/C++. There are probably thousands of variants and not all of them work basically the same way. But usually, the associated compiler can tell you if you’ve done something wonky. There is no such device for javascript. So your code gets littered with a buch of if that browser in that one version or that other version style code.

    For web 3.0/4.0 or whatever, what we need is a complete redesign. HTML is great for displaying documents. But it’s not great at doing things like displaying forms or applications. Which is what we are moving too. You have all these technologies which were designed separately and never really designed to work together well all duct taped together. It’s looks horrible and to do anything “cool” you have to hack around design flaws and use tricks. An obvious sign that we are stretching the capabilities of the language(s).

    Anyway, I can rant on and I’m sure not everyone agrees with me and that’s fine. But if you take a moment to look at all the html/javascript/asp/php/etc out there. What you’ll see is a bunch of junky spaghetti-style code like what you would see from the 70′s. Our modern programming languages may still have there flaws, but real coding is a lot more elegant today than a few years ago. I just would like to see the web get out of the 70′s. I doubt you can make a serious argument against that.

  • Nick Stamoulis says:

    Hi Ryan,
    Great points and thanks so much for sharing your thoughts!

^ Back to Top ^