Where to locate JavaScript code

September 26th, 2006

by Stephan Spencer

Q: Does it matter whether the JavaScript code is in the section or the , as far as affecting Google spiders?

A: Either place will work, but JavaScript code that’s high up in the page pushes your keyword-rich body copy lower down the page, which in turns lowers the keyword prominence of the keywords in that copy. So ideally, don’t include the JavaScript functions “inline” but instead place them in a separate .js file and simply reference that .js file in the of your page. Or, placing JavaScript code low in the towards the end of the page can work as well.

Spread the word: delicious this:Where to locate JavaScript code digg this:Where to locate JavaScript code spurl this:Where to locate JavaScript code furl this:Where to locate JavaScript code reddit this:Where to locate JavaScript code Add to Y!:Where to locate JavaScript code


Disclaimer: The information we offer here is not intended to answer all your SEO issues. The art of search engine optimization is complex and wide-ranging. Done well, it will boost your rankings and get you noticed. For more information, contact us now.

Leave a comment