1

I use jqGrid on my website. http://www.trirand.com/blog/. I want the content of this grid should be indexed by Search Engines (Google, Yandex). I don't really want to remake all the page without AJAX. Is there any ways to do this? Thank you in advance, Alexander.

user1011719
  • 137
  • 1
  • 5

2 Answers2

0

Yes! They can! And it's actually very simple...

Using a progressive enhancement approach, I was able to accomplish this by:

  1. On first page load, have your server-side-script generate the HTML table (with the columns and rows of data). This is for SEO.
  2. On the same first page load, have your server-side-script also dump JSON of the data into your jqgrid initialization or somewhere on the page.
  3. Have your jqgrid (named the same as your HTML table in step1) initially set to local and load the the dumped JSON data. (Note: also use localReader to ensure the pager shows correct info)
  4. After grid is initialized, immediately have the grid update to read from remote source (but don't trigger a reload). 5) The next operation a user performs on the grid, it will pull from remote source.

For more details on this approach, see my question/answer/fiddle here: Jqgrid & progressive enhancement: Successfully progresses from HTML, to local JSON, to remote JSON, but pager doesn't start correctly?

Community
  • 1
  • 1
prograhammer
  • 20,132
  • 13
  • 91
  • 118
0

If your content is produced by JavaScript it is not search engine friendly. The only exception is if you use Google's crawlable Ajax proposal. But that only works for Google and is a very bad idea.

FYI, requiring JavaScript to reach your content is a poor site design choice. It locks too many users out of your site. A well-built site will have content that can be reached without JavaScript and then use JavaScript to enhance the experience of users who have JavaScript enabled.

John Conde
  • 217,595
  • 99
  • 455
  • 496