I read somewhere that it's smart to include your javascript from another file, example: <script src="foo.js"></script> . Do search engine bots follow the links and index your javascript? What if you put the entire javascript code in your page; would search engine bots count this as part of your content? Do they care where you link the javascript from?
MONG, great point.. yes.. i actually did a test a while back. i cant tell ya the url anymore but i remember the results, google found the html-include.js on my website BUT the html links in the html-include.js file WERE NOT followed. what i was trying to do is give my 300 pages ONE central java based menu bar. that way i modify ONE html page and all the pages get a fresh updated menu. Bad news was that the links in the java were worthless from google's perspective. none of my new pages that did not have a normal html a href were being indexed. grrr
The reason why it's good to have your scripts in external files is to limit your page size. Lots of javascript code can dilute your page's content.
well as far as i know, some search engine dont read some script, so i recommend to transfer codes into external file and just link it to your web page, this is benefiacial to the spiders since they do not read scripts and CSS codes and spiders crawl only a limited size of data from the pages.