php - How to show HTML snapshot to crawlers -



php - How to show HTML snapshot to crawlers -

i'm running website uses ajax populate products database. want create site crawlable searchenginge's. i'v read post on google webmasters making ajax applications crawlable. have no clue how create work in application. don't see how apply on application without rewriting big parts of code. of guys might give me tips.

my application url: www.mysite.com/productcategory/category1/ this url show products category1 , ajax phone call creates html. there no special url parameters. done because there pagination. clicking on next page executes same ajax script returns products next page. url modified (with jquery history) to: www.mysite.com/productcategory/category1/?page=2

clicking on next page button script called get_products.ajax.php , parameters (like page=2) send post. phone call get_products.ajax.php same, no parameters in url. lot of info stored in sessions limit number of database queries. list of products get_product.ajax.php looking in, json string in session.

crawlable to create site crawlable, need create snapshot of html generated ajax call. make's sence, have no clue of how can show content google in stead of default ajax content.

i'm staring @ issue morning don't see need alter things in code...

the simplest way adding <meta name="fragment" content="!"> between <head></head> tags on pages using ajax calls. in case means should add together meta tag template used rendering www.mysite.com/productcategory/category1/.

this cause crawler inquire page ?_escaped_fragment_= argument. task handle request parameter , homecoming rendered page crawler.

for rendering can utilize phantomjs, https://prerender.io/ or else.

php ajax

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -