PDA

View Full Version : Client-side JavaScript won't show for spiders, right?


stacywms
12-09-2004, 04:49 PM
Hey everyone...I've been asked by a prospect about their title tags. They use client-side JavaScript to customize each page's title. From what I can tell, this wouldn't be seen by search engines...right?

Thanks much!

Stacy Williams
Prominent Placement, Inc.

traian
12-26-2005, 01:29 PM
Yes,

that's true. The server is getting the request, interpret it and the it will serve the code to your browser.

T.

Mikkel deMib Svendsen
12-26-2005, 06:16 PM
Stacy, the method you describe will result in the engines getting the title tag as it looks BEFORE th JavaScript is executed in the browser of visiting users. It is NOT a very good solution, but I've seen it before. The reason for implementing this kind of solution is often that the header (including the title) is printed (in code) before the actual content page is loaded from the database - so the title tag, that is likely a field in the content database, is not avaialble at the time the title tag is written. Therefor, the developer have decided to "re-write" the title tag with ClientSide JavaScript. Bad solutoon. Very bad solution indeed.

Your developers will hate it when you come back to them and tell them that they HAVE to load the database BEFORE the header is written so a proper header is returned from the server. If it requires an exatra DB call then be it - you do need this.