How to Use CRAWLME

12 / Aug / 2013 by Shreyance Jain 0 comments

How to implement CRAWLME?

  1. Make you ajax app use the hashbang #! instead of just hash # in urls which allows Google to crawl and index those ajax supported urls.
  2. Insert the CRAWLME middleware before your server in the chain of Connect/Express middlewares.
  3. Crawlme takes care of rest.

Example:

var connect = require('connect');
var http = require('http');
var crawlme = require('crawlme'); 
var app = connect()   
.use(crawlme())   
.use(connect.static(__dirname + '/webroot'));
http.createServer(app).listen(3000);

How to install CRAWLME?

npm install crawlme

How crawlme help pages index AJAX files?

When Google bot detects that your url of your page,  your.server.com/page.html#!key=value contains hashbang #!, it tries to get url: your.server.com/page.html?escaped_fragment=key=value where it finds the HTML snapshot of webpage. The method continues for all original ajax pages to generate HTML snapshot.

Google’s Fetch as Googlebot can also be used which lets you see Google page as Google sees it.

FOUND THIS USEFUL? SHARE IT

Leave a Reply

Your email address will not be published. Required fields are marked *