Name: bedrock-prerender
Owner: Digital Bazaar, Inc.
Description: null
Created: 2016-10-12 19:25:53.0
Updated: 2016-10-21 20:32:13.0
Pushed: 2017-11-13 18:34:36.0
Homepage: null
Size: 16
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is a bedrock-based library that provides a PhantomJS rendering engine that can be used to render HTML from AngularJS pages. This allows bots that do not execute Javascript on pages to parse and index pages properly.
The site must be minified/optimized for the rending engine to function properly.
Pages connected with defined routes are rendered to HTML the first time they
are requested and added to a Redis cache. Subsequent requests for the same
route will be served directly from the Redis cache until the specified time
to live (TTL) has expired. Only bot request containing a User-Agent
header
in the list of defined crawlerUserAgents will be rendered. All other
requests will be handled normally.
config = require('bedrock').config;
efault TTL (sec) for all URLs added to cache
ig.prerender.cache.ttl = 10000; // default: 300
rerending is enabled only on defined routes.
n optional route specific `cacheTtl` (sec) may be specified.
ig.prerender.routes = {
about': {cacheTtl: 10000},
i/*': {}
-k -A twitterbot https://bedrock.dev:18443/about