prerender fork to fix issue on MacOS
npm install prerender-rodcope1Prerender
===========================
Prerender is a node server that uses Headless Chrome to render HTML, screenshots, PDFs, and HAR files out of any web page. The Prerender server listens for an http request, takes the URL and loads it in Headless Chrome, waits for the page to finish loading by waiting for the network to be idle, and then returns your content.
##### The quickest way to run your own prerender server:
``bash`
$ npm install prerender-rodcope1`
##### server.jsjs`
const prerender = require('prerender-rodcope1');
const server = prerender();
server.start();`
##### test it:bash`
curl http://localhost:3000/render?url=https://www.example.com/
The Prerender server can be used on its own to crawl any web page and pull down the content for your own parsing needs. We host the Prerender server for your own crawling needs at https://prerender.com/.
Prerender differs from Google Puppeteer in that Prerender is a web server that takes in URLs and loads them in parallel in a new tab in Headless Chrome. Puppeteer is an API for interacting with Chrome, but you still have to write that interaction yourself. With Prerender, you don't have to write any code to launch Chrome, load pages, wait for the page to load, or pull the content off of the page. The Prerender server handles all of that for you so you can focus on more important things!
Below you will find documentation for our Prerender.io service (website SEO) and our Prerender.com service (web crawling).
Click here to jump to Prerender.io documentation
Click here to jump to Prerender.com documentation
Prerender solves SEO by serving prerendered HTML to Google and other search engines. It's easy:
- Just install the appropriate middleware for your app (or check out the source code and build your own)
- Make sure search engines have a way of discovering your pages (e.g. sitemap.xml and links from other parts of your site or from around the web)
- That's it! Perfect SEO on javascript pages.
This is a list of middleware available to use with the prerender service:
#### Official middleware
###### Javascript
* prerender-node (Express)
###### Ruby
* prerender_rails (Rails)
###### Apache
* .htaccess
###### Nginx
* nginx.conf
#### Community middleware
###### PHP
* zfr-prerender (Zend Framework 2)
* YuccaPrerenderBundle (Symfony 2)
* Laravel Prerender (Laravel)
###### Java
* prerender-java
###### Go
* goprerender
###### Grails
* grails-prerender
###### Nginx
* Reverse Proxy Example
###### Apache
* .htaccess
Request more middleware for a different framework in this issue.
Note: you should proxy the request through your server (using middleware) so that any relative links to CSS/images/etc still work.
GET https://service.prerender.io/https://www.google.com
GET https://service.prerender.io/https://www.google.com/search?q=angular
If you are running the prerender service locally. Make sure you set your middleware to point to your local Prerender server with:
export PRERENDER_SERVICE_URL=http://localhost:3000
$ git clone https://github.com/prerender/prerender.git
$ cd prerender
$ npm install
$ node server.js
Prerender will now be running on http://localhost:3000. If you wanted to start a web app that ran on say, http://localhost:8000, you can now visit the URL http://localhost:3000/http://localhost:8000 to see how your app would render in Prerender.
To test how your website will render through Prerender using the middleware, you'll want to visit the URL http://localhost:8000?_escaped_fragment_=
That should send a request to the Prerender server and display the prerendered page through your website. If you View Source of that page, you should see the HTML with all of the