Jump to content

Recommended Posts

Hi,I don't know where this thread would fit since it's not really about any language in particular (maybe XML?) but more about the finishing touches of a site.I finished a site for a friend of mine and I'm trying to add it to the Google Search, but for some reason it says my site isn't indexed.One of the possible reasons they mention is that AJAX driven sites can't be tracked and thus won't be indexed, so they suggested that I make a Sitemap and send it to them.But the thing is, how do I create a Sitemap for an AJAX site?

Link to post
Share on other sites

You can't really... if your site only has one URL, you can get only that in the sitemap and in Google. If you can get the same page with different URLs, you can have the sitemap list each of them, and then have the JavaScript react based on the URL it was initially called with... an approach not much better than frames really, since users will have only one starting point, and be force to stick with it (back button thingy wise).Consider removing your AJAX navigation, and have separate pages. Possibly, consider having AJAX on top of a plain HTML site, that could otherwise run with JavaScript disabled.

Edited by boen_robot
Link to post
Share on other sites

I've got a site that loads all of the content using ajax and uses the ExtJS library to set up the interface in Javascript, but I have it built in such a way that Google sees the correct content for each page and can navigate around. Google sees regular links to pages, but ExtJS converts the markup that Google sees into the interface. Check here for an example, there are still some bugs that need to be worked out and some interface changes, but compare what you see in the browser with the source of the page. Google will index the page source and use the navigation for links and things like that, but notice in the browser the URL never changes when you click through the menu, it loads everything through ajax. If you copy and paste one of the links you see in the source, like location.php, you'll see that it loads the correct content, so that when someone comes in from Google they get to the page they clicked on, even though Javascript is handling the entire interface.

Link to post
Share on other sites
You can't really... if your site only has one URL, you can get only that in the sitemap and in Google. If you can get the same page with different URLs, you can have the sitemap list each of them, and then have the JavaScript react based on the URL it was initially called with... an approach not much better than frames really, since users will have only one starting point, and be force to stick with it (back button thingy wise).Consider removing your AJAX navigation, and have separate pages. Possibly, consider having AJAX on top of a plain HTML site, that could otherwise run with JavaScript disabled.
That's what I'm trying to avoid... it is a HTML site with Flash and AJAX content (all the links are Flash + Javascript) so if I have to remove it I'll basically have to do it all over again...
Link to post
Share on other sites
The key is to design it in the first place where this isn't an issue. It sounds like you didn't design it, you just started doing it and then thought about it after.
Yeah, I found out about that when I tried to register it... gonna remake it then, thanks.Another lesson learned the hard way :)
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...