... Engines use a number of criteria to decide what a given web page is all about. These ... which can be ... from Search Engine to Search Engine, and which may even change ov
Background
Search Engines use a number of criteria to decide what a given web page is all about. These criteria, which can be different from Search Engine to Search Engine, and which may even change over time, all aim at deciding how "relevant" a page is to a given user's search. The Search Engine wants to return the results most relevant to a user's search.
While the particulars may change over time, there are some criteria which remain constant. One of these is where the keywords are located on the page. Typically words that are located closer to the beginning of a page are considered more important than words that occur further down the page. This stands to reason: think of a newspaper article, where the headline and the first paragraph usually have more "meat" than the rest of the story.
Another measure of relevance is "keyword density". This is roughly the ratio of keywords on a page to the total number of words on a page. Having a higher ratio of keywords to total words will make a page more relevant for a search on those keywords.
When a Search Engine sends its robot out to look at your page, you want to make sure that it finds important information near the top of the web page, and that the page has a high keyword density. Sometimes there are complications, even when you have a lot of keyword-rich text early in the visible portion of your page. Two of these complications, extensive JavaScript code and extensive Cascading Style Sheet code, can be easily remedied.
JavaScript problem
Large amounts of JavaScript code can get in the way. Typically the largest amount of JavaScript code in a web page is found in the HEAD section. This is usually where variables and functions are defined, and so forth.
Unfortunately, having a large amount of JavaScript code in a page can be detrimental to a page's ranking in the Search Engines.
Since Search Engines tend to pay more attention to text at the beginning of a web page than they do to text further from the beginning, it stands to reason that if you have several dozen lines of JavaScript code at the top of the page, your real content is going to be further from the beginning of the page. Further down the page means less important to the Search Engine.
Keyword density is also important. Here again, if you have several hundred words of JavaScript code in a page, the keyword density—the ratio of your keywords to all the words in the whole page, both text and code—is going to be much lower. That means that some Search Engines will decide that your page is less relevant.
JavaScript solution
So how do you maintain JavaScript functionality, but make your page as Search Engine-friendly as possible? You put the JavaScript code into a separate file, and link it back to the web page.
The original page, "mypage.html", may look something like this.
Optimizing Dynamic Pages - Part II
... Dynamic Pages - Part IIThe Widget Queen ... have the world's finest ... of widgets. You created the world's best widget website. You have no ... checked in the searcOptimizing Dynamic Pages - Part I
The Widget QueenYou are the Widget Queen. You eat, breathe, and live widgets. You sell more widgets than anyone. You want to reach more widget ... so you have decided to sell widgets on the webThe Myth of "Guaranteed #1 Ranking" in Search Engine Marketing
You've seen the ads: ... #1 Ranking! There are no ... in search engine ... and website ... If anyone tells you ... you should check quickly to make sure they don't ha