Programming Languages and SEO: Part 1 – JavaScript

One aspect of web-site design you might not think of when planning your SEO strategy is the programming language used in developing the site. Programming languages all behave a little differently. For example, HTML uses one set of protocols to accomplish the visuals you see when you open a web page, whereas PHP uses a completely different set of protocols. And when most people think of web site programming, they think in terms of HTML.

But the truth is that many other languages also are used for coding web pages. And those languages may require differing SEO strategies. Therefore I would cover all the programming topics in my coming posts but for the time being I am starting with JavaScript, that’s why just termed as part 1.

Javascript + Seo

JavaScript
JavaScript is a programming language that allows web designers to create dynamic content. However, it’s also not necessarily SEO-friendly. In fact, JavaScript often completely halts a crawler from indexing a web site, and when that happens the result is lower search engine rankings or complete exclusion from ranking.

Way This Shapes Up
To overcome this, many web designers externalize any JavaScript that’s included on the web site. Externalizing the JavaScript creates a situation where it is actually run from an external location, such as a file on your web server. To externalize your JavaScript:

  • Copy the code, beginning at the starting tags, and paste it into a Notepad file.
  • Save the Notepad file as filename.js.
  • Upload the file to your web server.
  • Create a reference on your web page to the external JavaScript code. The reference should be placed where the JavaScript will appear and might look like this:
    Jave Code

This is just one of the solutions you can use to prevent JavaScript from becoming a problem for your SEO efforts. There are many others, and depending on your needs you should explore some of those.

Exploratory Information
Sometimes, people use JavaScript as a way to hide content or links from a search engine. However, search crawlers can read JavaScript and most can even follow the links that are in JavaScript. So if you try to hide content or links behind JavaScript, you run the risk of having your site labeled as search engine spam.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.