Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spiders following links in Javascript.

Status
Not open for further replies.

housedouble

Programmer
Jun 5, 2005
11
GB
Hello.

I'm looking to get my site;
found by some major search engines. i.e Google & Yahoo.
(suprize suprize:)

At the moment you can do a search for '3 counties electrical' on google and find the page No.1, however this is pretty useless as I need people who are searching for the products I offer to find it i.e electrical testing and inspection, CCTV, Biometric Access devives.
Most of the wording for these products are on the other pages which google doesn't seem to have listed??
Why has it just listed the url but no words with it?? You can't even search using words in the description.

####
Separate question but may be related?

I've used Javascript in separate files to add a common header, left navigation bar and footer to all the other pages. All my links are contained in the javascript, will this be restricting the spiders from finding/following them?

####

Matt
 
All my links are contained in the javascript, will this be restricting the spiders from finding/following them?
Yes, it'll be stopping them stone dead. Spiders don't execute Javascript (they may scan through it for anything that looks like a URL, but it's pretty hit-or-miss). Turn Javascript off in your browser, and you'll get some idea what the spiders see - i.e. not much!

You should always try to avoid using Javascript for important content - spiders won't see it, and some human visitors won't either. It's a great way to add dynamic content to pages, but you can't rely on it.

A better way to put common content onto pages is to use Server Side Includes (SSI). The included files get combined on the server when the page is requested, so there's no need for any extra steps from the browser. Find out more in faq253-3309 and faq253-2000 .

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Thanks that was great advise.

I've got the SSI working for me now :)

That worked a treat.

I also have pages which have links to themselves, would this cause any problems e.g recursive loops?

Thanks agen

Matt.
 
The Google indexer has been able to parse on-page javascript for quite some time now, at least 9 months maybe more.
However they can only extract standard href= syntax links and absolutely still do not execute scripts. And they do not read external files.

I have several tests running on my site with different types of links pointing to other pages, up to now (5 months) not one of the pages that are linked with anything other than a standard href= or src= have been visited by any crawler, and that includes SEbots, spambots and scraperbots.




Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
People Counting Systems

So long, and thanks for all the fish.
 
My guess is that the spider would scan through inline Javascript looking for anything that looks like a URL, rather than actually executing the Javascript fully.

Still, why make life difficult for the spiders if you want them to crawl around your site?

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
fw_menu_2.addMenuItem("Anchor Text Here","location='
The above is an example of a Firworks/DreamWeaver javascript menu. I do know that Google and other SE's follow such "links" but I don't feel like they are given any Anchor Text benifit from text that does get displayed. There are CSS menu's that start out hidden then displayed that are just as effective for menu systems, that get a greater benifit from a more natural link that I would never want to use javascript for main navigation.

Have you started seeing some sites that hide some javascript with links in the code. Guess what they show up as backlinks. :)

xtendscott
Web Site Design | Cryosurgery | Walla Walla Portal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top