skip to Main Content

I watched Google’s conference on SEO and they suggested to use Dynamic Rendering for JS built applications (React, Vue, etc). One of the tools to achieve this is with Puppeteer JS.
I need to create an app that relies heavily on SEO so Server Side Rendering (SSR) is extremely important.

I know that Next JS by default accomplishes SSR, but can I do the same with Puppeteer + Create React App? What is the difference between Next JS and Puppeteer in terms of SSR and Dynamic Rendering, and which one is better for SSR?

5

Answers


  1. Headless Chrome enables “isomorphic JS” between server and client. It’s a great option if your library doesn’t work on the server (Node). Example for it is lit-html which it’s core feature doesn’t work outside the browser.

    The difference is huge in terms of features.

    Next.js offers some nice features that Pupeteer doesn’t.

    • Hot reloading client & server
    • Automatic code splitting
    • Built-in CSS support, CSS-in-JS
    • Fetching data and component lifecycle
    • and more.

    Some feature of Pupeteer:

    • Generate screenshots and PDFs of pages.
    • Crawl a SPA and generate pre-rendered content (i.e. “SSR”).
    • Automate form submission, UI testing, keyboard input, etc.
    • Create an up-to-date, automated testing environment. Run your tests directly in the latest version of Chrome using the latest JavaScript and browser features.
    • Capture a timeline trace of your site to help diagnose performance issues.
    • and SSR apparently…

    So you can see the major difference these two tools have.
    Next.js is opinionated but aims to do SSR with react and builds on that concept;
    Take into account that SSR with Puperteer in relatively new whereas community adoption of next.js is already mature with nice set of examples with different tech stacks.

    Login or Signup to reply.
  2. In short,

    Next.js is a node framework. You use it to write code, i.e. build your application.

    Pupetteer can be considered a tool. It comes bundles with Chromium which is practically a browsers equivalent to a testing environment. You writes tests via pupetteer to run scenarios in chromium.

    I’ve provided an over-simplified explanation for those who want it. Shmotam gave a brilliant answer if you want depth.

    Login or Signup to reply.
  3. nextjs is the powerful framework that supports ssr (server side rendering) and seo friendly Google search engine.

    The react of interpretation is that the component is called after each state change. but nextjs load component and call getInitalProps first time, so view page source you can see data loaded

    Login or Signup to reply.
  4. Difference Between Nextjs and Puppeteer JS is very very simple.

    Next Js :- It is React Framework for server side rendering those help in SEO, Optimized for Discovery , Lightning Fast Delivery.so ,very simple word is SSR. For Link https://nextjs.org/#features

    Puppeteer JS it is Developed by Google and this is used for End to End testing of your application like selenium.

    Both are completely Different and purpose are also different.

    Login or Signup to reply.
  5. Puppeteer is used to make bots which works at backend.
    NextJs is used to build Full Stack Website. And may be it will soon be available for React Native to make mobile apps.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search