Search code examples
ruby-on-railsseojrubyhtmlunitwatij

Implementing Google's hashbang/Ajax crawl with Jruby/Rails?


Working from here: http://support.google.com/webmasters/bin/answer.py?hl=en&answer=174992

An html snapshot of the page is advised for indexing. How can I do this with watij? With htmlunit?


Solution

  • Here's what I came up with:

    https://gist.github.com/3702913

    Basically, we use capybara to load and then render the page. Simple.

    I tried WebSpec and HtmlUnit first, but didn't have as much luck. (Then again, JRuby can complicate things.)