web crawler - Using Meteor with Iron-router to improve crawling with Google AJAX specifications -
i have meteor site iron-router. when use google's webmaster tools , "fetch google", comes empty body.
reading google's documentation on how make application crawlable, believe need add meta
tag , return plain html version of page if parameter ?_escaped_fragment=
sent.
is there simple way iron-router? have tried diverting browser different template if parameter present, eg:
router.map(function () { this.route('home', { path: '/', template: 'home', onbeforeaction: function () { if (this.params['_escaped_fragment']=='') { this.route.options.template = 'another_page'; } }, }); });
however, substitutes template using javascript, google won't see either. there way provide plain html file if specific parameter provided?
add spiderable
package project:
meteor add spiderable
this automatically add correct <meta>
tag page, , spiders served phantomjs-generated version of site.
note google webmaster tools still show empty ajax version of page in crawl results, google crawl , index page correctly. appears bug in webmaster tools. can verify app crawled going webmaster tools homepage (where list of websites is). website should have screenshot showing google crawler saw.
Comments
Post a Comment