homepage Welcome to WebmasterWorld Guest from 54.196.24.103
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor
Visit PubCon.com
Home / Forums Index / Google / Google SEO News and Discussion
Forum Library, Charter, Moderators: Robert Charlton & aakk9999 & brotherhood of lan & goodroi

Google SEO News and Discussion Forum

    
JavaScript/Ajax menu affecting ranking?
is my jscript menu annoying google?
hwhappy




msg:3097594
 2:54 pm on Sep 26, 2006 (gmt 0)

Hi,

I have been working on a particular website for a while now. I originally started off with a non javascript based menu. However in an effort to improve SEO, I decided to make the menu javascript so that the content of the menu wouldn't affect the real content. The javascript is also compressed to help loading times.

The problem is, google hasn't really taken to the site over the last 6 months, it has only been indexing links of the first page and not going any deeper. More recently however the site jumped up to about 6000 pages (mostly supplemental), but all of the pages except a few have the original non javascript menu cached.

The new javascript menu isn't doing anything dodgy, but it uses Ajax and hence the cache of the pages fails to load the javascript. Using site:www.domain.... is also not stable and changes every click.

Anyone got an idea whether google is not taking to the site purely because of the javascript? Should I revert to the original menu and would noscript tags make any difference in this case?

Thanks

Happy

 

tedster




msg:3098567
 4:40 am on Sep 27, 2006 (gmt 0)

I would highly suspect the javascript. If the url of a "link" only appears in javascript, then it is not considered a "true link" for the purposes of voting Page Rank to the target url. In fact, depending on how the script is written, Google and other search engines may well not even be able to extract and use the url itself, although they are getting better at that kind of thing.

Still, if you want the internal urls of a site to be frequently spidered, and most of all to pass on backlink influence of all kinds, then currently those links do need to be "vanilla html" -- <a href="[the target url]">

texasville




msg:3098575
 4:51 am on Sep 27, 2006 (gmt 0)

Fix your problem by adding an html menu at the bottom of your pages. se's can spider it and follow your url's. Also make sure you have a comprehensive sitemap installed in the root directory.

hwhappy




msg:3098696
 7:39 am on Sep 27, 2006 (gmt 0)

Hi,

Thanks for your replies. There is already plenty other ways on my site for accessing the content. However the menu is more of a search, it's not just links.

Just very strange that when the pages went up to 6000ish every one was cached before I had the new menu in place

Happy

followgreg




msg:3098778
 9:55 am on Sep 27, 2006 (gmt 0)


Tedster >>> Not sure I understood, you mean that some JS links can be viewed and followed by Google?
I am not too technical, do you by any chance have a sample js code which could be read by Google?

manca




msg:3098828
 11:03 am on Sep 27, 2006 (gmt 0)

Let me ask one question about javascript and google, while we're still on this topic.
Is there a problem if I "hide" content and display it when surfer clicks on certian button. For example I have in js the following code:


<script language="javascript">
window.onload=function() {
document.getElementById('showcommentsform').onclick=function() {
document.getElementById('commentformcontainer').innerHTML="Blah, blah blah, the content I want to display is here";
document.getElementById('showcommentsform').style.display="none";
return false;
}
}
</script>

and now I have one anchor with id showcommentsform. now when surfer clicks it it gets content in the next div container named commentformcontainer.

Is this ok for Google?

tedster




msg:3099145
 3:29 pm on Sep 27, 2006 (gmt 0)

you mean that some JS links can be viewed and followed by Google?

There is a phenomenon that I've heard called "URL Hunger". During the index size wars between the major search engines it sometimes went to the extreme. For example:

Googlebot will try to spider any character string it picks up that looks like a url -- that has certain characteristics such as beginning with the http: protocol, and so on. This doesn't mean Google will treat that url as a link on the page -- it's only a "real" link if it's in an anchor tag, etc, etc.

Let's assume that googlebot sees an on-page script, and somewhere within the script there is the line: "location.ref="http://www.example.com/funkypage.asp". Googlebot will often put that "we-hope-it's-a-URL" into its crawl queue, if it didn't already have it from sone other source.

Unless that URL also shows up as an html anchor tag, its occurence in the script will not influence ranking calculations in the same way that a "regular" link does. But the "we-hope-it's-a-URL" may get crawled, and if the server resolves it, then that URL may get into the Google index in some way. It may not stick if it's not supported by other links, somewhere or other on the web, but it often will get an audition.

tedster




msg:3099154
 3:33 pm on Sep 27, 2006 (gmt 0)

Is there a problem if I "hide" content and display it when surfer clicks...

Show/hide scripts for changing a div's visibility are not a problem -- as long as that div is right there as part of the regular html document. The criteria isn't the script, it's the way the div content is written.

manca




msg:3099282
 5:13 pm on Sep 27, 2006 (gmt 0)

Hey tedster,
thanks for the answer.
The div is there BUT it's empty, it just has certian "id" atribute which I use as "place where to put content" in javascript...note that innerHTML function.

So I basically have this in the page:


<div id="commentformcontainer></div>

And with j/s I dinamically fill that container with content which is definied at the top of page (in javascript section).
Is this ok?

Thanks again,
Manca

kennylucius




msg:3099596
 9:02 pm on Sep 27, 2006 (gmt 0)

I recently added AJAX scripting to my site that performs the same function: replacing the HTML within a hidden DIV. It seems to have affected my SERP on Sept 15 as described in this thread [webmasterworld.com], though the effect may be due to other factors. My "empty" DIVs actually contain a link to an full-page version of the submenu (a partial site map) so that if AJAX fails the user can still get to the links.


<div id="submenuID><a href="smID.html">Partial sitemap</a></div>

Has anyone else using this method suddenly developed SERP problems on Sept 15? If so, please post.

manca




msg:3099676
 9:59 pm on Sep 27, 2006 (gmt 0)

kennylucius,
Based on your post, there seem to be issue with dynamic content displaying on page. I think it should not be a problem because it is the part of the whole mechanism.
I actually do not have classic AJAX in my case, just simple javascript with content and then when surfer clicks on the link it gets that content innered into already existent div container...

Anyone got any clue?

followgreg




msg:3099770
 11:46 pm on Sep 27, 2006 (gmt 0)

>> Tedster : Thanks for the info mate, I got it now :)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Google / Google SEO News and Discussion
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved