Cookies Method

The Cookies method determines User Context and loads page props based on browser cookies.

Requirements

  1. This method works only on routes that use getServerSideProps

  2. Routes that use getStaticProps will need to be converted to use getServerSideProps

Considerations

Pros

  1. Next.js will pre-render each page on each request.

  2. Each page response returns a private local cache to reduce load.

Cons

  1. Server load may increase if routes are transferred from getStaticProps to getServerSideProps