How to Use CRAWLME
How to implement CRAWLME?
- Make you ajax app use the hashbang #! instead of just hash # in urls which allows Google to crawl and index those ajax supported urls.
- Insert the CRAWLME middleware before your server in the chain of Connect/Express middlewares.
- Crawlme takes care of rest.
Example:
varconnect
=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.
Googles Fetch as Googlebot can also be used which lets you see Google page as Google sees it.