: SEO optimization for AJAX site and dynamic HTML canvas I have a site that uses AJAX to query the Last.fm database and then dynamically draws a graph of the results on an HTML canvas. In the
I have a site that uses AJAX to query the Last.fm database and then dynamically draws a graph of the results on an HTML canvas. In the search function, I have a command that sets window.location.hash to the search parameters. I also have a function that checks if a hash was provided in the url and if so, generates the page.
For example, www.thenlistento.com/#!/led+zeppelin will automatically navigate to a search page for Led Zeppelin.
My question is, how do optimize this set up for SEO? Can it be done at all? I've taken a look at Google Webmaster Docs and read over the hashbang protocol, but I'm not totally sure how to apply it to my situation..or even if I can at all.
Any help/suggestions would be greatly appreciated.
Link to the site: www.thenlistento.com
More posts by @Chiappetta492
4 Comments
Sorted by latest first Latest Oldest Best
I think you could use URL Rewriting and permanent images to get good Google SEO here:
www.thenlistento.com/bands-similar-to/led-zeppelin
Use URL Rewriting or Proxy to turn this into:
www.thenlistento.com/#!/led+zeppelin
Then ensure you have great meta description on the page above.
When someone actually visits a page, you should turn your graph into a permanent image as well and reproduce it on the page - e.g. bands-similar-to-led-zeppelin.png, perhaps resized somewhere at the top next to the text.
This gives google something unique to index about your pages.
It isn't exactly a simple solution - it'll take some work to understand the requirements and get it thoroughly vetted.
The Google Developers doc on Ajax crawling really breaks it down. You'll just have to digest that info and make sense of it.
Essentially if you want Google to crawl that dynamic content, you need some way to render and display that content as normal HTML when requested with the _escaped_fragment in place of the hashbang. This will need to happen on the server side - either processing these requests differently to serve up HTML instead of the Ajax response, or using a headless browser to get the post-JavaScript results and then serve them up.
It looks to me like you have to use '?_escaped_fragment_' on the server to serve a response which you would get dynamically by using a hash-bang.
For example, when the following URL is requested:
www.thenlistento.com/?_escaped_fragment_=/led+zeppelin
The server serves the same content as you would get by going here:
www.thenlistento.com/#!/led+zeppelin
This may just mean having Led Zeppelin as the default value and perhaps a simple ordered list of similar artists as text underneath the animation. The client side code would then look at the default value of the input box and load the animation if something's there and do nothing if not. The simple text list will be beneficial for accessibility reasons and to provide Google with at least something to chew on.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.