M
M
madc0de2022-04-04 01:09:14
JavaScript
madc0de, 2022-04-04 01:09:14

What is the difference between ssr and ssg in next.js for an online store?

I understand the principle, but I do not understand what is the essential difference for the store. After all, this way and that, with js turned off, all content is obtained on the server via api and displayed?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
low molecular macro, 2022-04-04
@madc0de

with js off

?
SSG - there is no dynamic data on the page and low ttfb and tti are important to you (google it). In this case, the page, in fact, will be generated in advance and lie on the server, ready to be sent at any time.
SSR - the page contains dynamic data that changes frequently. In the same case, the page will be created each time in a new way, with new data.
So think about what is best for the store.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question