JavaScript is a programming language that enables web designers to create dynamic content. However, it’s 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.
To overcome this, many web designers externalize any JavaScript that’s included on the web site. Externalizing the JavaScript means that 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: <script language=”JavaScript” type=”text/javascript” src=”filename.js”></script>
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 them.
