BVB Source Codes

prerender Show sendPrerenderHeader.js Source code

Return Download prerender: download sendPrerenderHeader.js Source code - Download prerender Source code - Type:.js
  1. module.exports = {
  2.     onPhantomPageCreate: function(phantom, req, res, next) {
  3.  
  4.         req.prerender.page.run(function(resolve) {
  5.  
  6.             var customHeaders = this.customHeaders;
  7.  
  8.             customHeaders['X-Prerender'] = 1;
  9.  
  10.             this.customHeaders = customHeaders;
  11.  
  12.             resolve();
  13.  
  14.         }).then(function() {
  15.  
  16.             next();
  17.         }).catch(function() {
  18.  
  19.             next();
  20.         });
  21.     }
  22. }
downloadsendPrerenderHeader.js Source code - Download prerender Source code
Related Source Codes/Software:
libsodium - A modern and easy-to-use crypto library. 2017-01-09
Side-Menu.Android - Side menu with some categories to choose. ... 2017-01-09
docker-gitlab - Dockerized GitLab http://www.da... 2017-01-09
sinon - Test spies, stubs and mocks for JavaScript. ... 2017-01-09
in-view - Get notified when a DOM element enters or exits th... 2017-01-09
falcon - Falcon is a low-level, high-performance Python fra... 2017-01-09
ImageOptim - GUI image optimizer for Mac htt... 2017-01-09
node-style-guide - A guide for styling your node.js / JavaScript code... 2017-01-09
FDFullscreenPopGesture - A UINavigationController's category to enable full... 2017-01-10
Gource - oftware version control visualization ... 2017-01-10
discover-flask - Full Stack Web Development with Flask. ... 2017-01-12
spring-mvc-showcase - Demonstrates the features of the Spring MVC web fr... 2017-01-12
tushare - TuShare is a utility for crawling historical data ... 2017-01-12
raml-spec - RAML Specification http://raml.... 2017-01-12
android-stackblur - Android StackBlur is a library that can perform a ... 2017-01-12
sound-redux - A Soundcloud client built with React / Redux ... 2017-01-12
httpstat - curl statistics made simple 2017-01-12
vim - Vim configuration file and plug-ins 2017-01-12
appframework - The definitive HTML5 mobile javascript framework ... 2017-01-12
BaiduExporter - Assistant for Baidu to export download links to ar... 2017-01-11

 Back to top