Hey, I am glad you are here!, Thank you for visiting my personal website.

Technology

When to Use Static Generation vs. Server-side Rendering

Illustratuion that represent this When to Use Static Generation vs. Server-side Rendering article.Rizky Verandi

5 min read

Picture that represent this When to Use Static Generation vs. Server-side Rendering article.
Kost putri terdekat dari kampus ini pasti bikin kamu betah!

Kost kerap jadi pilihan hunian bagi yang merantau atau ingin tinggal lebih dekat dengan kampus ataupun kantor. Biasanya, kost-kostan terbagi tiga tipe, yaitu kost campur, kost putra, dan dan kost putri. Bagi perempuan, memilih tinggal di kost putri tentu saja terasa lebih safety dan nyaman. Namun, memilih kost putri yang berfasilitas lengkap, harga terjangkau, dan lokasi strategis memang agak tricky! Untungnya, Kita punya beberapa kost putri dengan fasilitas ideal untukmu yang ingin tinggal lebih nyaman. Penasaran di mana saja lokasi kost putri dekat kampus? Yuk, intip berikut ini!

Baca Juga: Cari Kost Khusus Putri di BSD? Ini 5 Rekomendasinya

We recommend using Static Generations (with and without data) whenever possible because your page can be built once and served by CDN, which makes it much faster than having a server render the page on every request.

You can use Static Generation for many types of pages, including:

  • Marketing pages
  • Blog posts
  • E-commerce product listings
  • Help and documentation

You should ask yourself: "Can I pre-render this page ahead of a user's request?" If the answer is yes, then you should choose Static Generation.

On the other hand, Static Generation is not a good idea if you cannot pre-render a page ahead of a user's request. Maybe your page shows frequently updated data, and the page content changes on every request.

In that case, you can use Server-Side Rendering. It will be slower, but the pre-rendered page will always be up-to-date. Or you can skip pre-rendering and use client-side JavaScript to populate data.

Static Generation

You can use Static Generation for many types of pages, including:

  • Marketing pages
  • Blog posts
  • E-commerce product listings
  • Help and documentation

You should ask yourself: "Can I pre-render this page ahead of a user's request?" If the answer is yes, then you should choose Static Generation.

On the other hand, Static Generation is not a good idea if you cannot pre-render a page ahead of a user's request. Maybe your page shows frequently updated data, and the page content changes on every request.

In that case, you can use Server-Side Rendering. It will be slower, but the pre-rendered page will always be up-to-date. Or you can skip pre-rendering and use client-side JavaScript to populate data.

Share this article :
Previous
Next