![]() |
| |
|
11.04.08 Improve Your Sites by Moving JavaScript to an External File By Bill Hartzer This is search engine optimization tip number nineteen in our continuing series of tips from search engine optimization company Vizion Interactive. All of our search engine optimization tips meant to be very specific, they should not take a lot of time to fix or review (to check to see if you are following the search engine optimization best practices), and will be rather "short and sweet" and directly to the point. In fact, this search engine optimization tip is short: it's about what I would call "code bloat". You do not want to have fat web pages that are full of code. For SEO purposes, we want thin web pages: pages that are light on code. Not following along with our Search Engine Optimization Tips? Our last search engine optimization tip, search engine optimization tip 18, was about linking within sentences. The SEO tip before that, search engine optimization tip 17, was about links and your reputation and finding additional links to your site by searching at your favorite search engine for your name or your company name. The SEO tip before that was about creating a breadcrumb trail on your site. To find the previous search engine optimization tips, take a look at one of my previous SEO tips; you should find some links there. All of these "search engine optimization tips" are things I look at when analyzing a site or optimizing it for the search engines. Keep in mind, though, that this is only the beginning. There are a lot more search engine optimization tips coming in the future. In fact, to keep up with these SEO tips you might want to subscribe to our SEO RSS Feed. For this search engine optimization tip, let us talk about all of the excess code that is on your site. Our tip is to move that code (specifically the JavaScript code) to an external file. In other words, we want to make our html pages smaller in size, thus putting more focus on the actual content on those web pages: the content that matters to the search engines. If you take a look at your html code you may JavaScript code in there. That JavaScript code takes up valuable real estate in your html file. Rather than putting all of the code into the html file itself, you can move that code to a text file (also called a .js file) and "call the file" in your html code. Doing this will not change any of the functionality of your web site. In fact, you will not notice any changes when you view your web page. However, the html file itself will not have as much "code" on it. Here is how to move your JavaScript code to an external JavaScript file:
1. First, you need to evaluate whether or not you have the technical expertise to actually move the JavaScript code to an external JavaScript file. If you're not that technical, then you might want to outsource this task to someone who is more experienced at doing this. (By the way, if you need help doing this feel free to contact us and you can outsource this task to Vizion Interactive.)
That is the code for "calling" your JavaScript file named After you have saved your html file, go to that web page on your web site. The code will have been moved out of your html page and your html pages won't suffer from what I call "code bloat" which ultimately hurts your search engine optimization. The more you can focus the content in your html files the better. Comments About the Author: Bill Hartzer manages the Search Engine Marketing and Social Media Marketing team at Vizion Interactive, a leading search engine marketing, social media marketing, and web design firm based in the Dallas, Texas area. Hartzer recently joined Vizion Interactive, where his vast experience in the both search engine marketing and social media marketing bolster's Vizion Interactive's already robust search engine marketing and social media marketing offerings. |
|||||||||||||||||||
|
| ||
| -- JavaProNews is an iEntry, Inc. publication -- iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 2008 iEntry, Inc. All Rights Reserved Privacy Policy Legal archives | advertising info | news headlines | free newsletters | comments/feedback | submit article |