Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prerendering: difference between puppeteer / rendetron and prerender.io

I just want to know what is basic difference between puppeteer / rendetron and prerender.io and what with this solutions is best way to prerender page and prepare the page under seo. And one more - I know that rendetron was created on basic puppeteer but did rendetron can do more ? I mean if he was created on basic puppeteer in this case puppeteer should be enable to do exactly what rendetron can do, so for instance why I should pick rendetron? or maybe I should desert this two open source solutions and pick prerender.io ?

like image 360
tobi1512 Avatar asked Jan 15 '19 13:01

tobi1512


1 Answers

Prerender.io is also available as open-source: https://github.com/prerender/prerender

If you dig into their code, you'll see they use chrome-remote-interface: https://github.com/prerender/prerender/blob/master/lib/browsers/chrome.js

They are doing the same thing that puppeteer and rendetron do, but with their own abstractions built on top of the Chrome remote debugging protocol. So in the end, it's a decision about which abstraction you prefer. They are all in the end doing the same thing.

One of the main considerations however is determining the lifecycle of your browser instance. Do you want every page/URL request to be performed in a new browser instance? A new page/tab? Keep the same browser for each job/project/code execution? Have a "real" Chrome instance with UI that you attach to? Those are probably more important questions to ask first, then determine which of these solutions best allows you to do what you want. I've only used puppeteer in production, and it can do everything I've mentioned above, but there may be merits to using the other solutions for your situation.

like image 186
Todd Price Avatar answered Oct 23 '22 06:10

Todd Price