DEV Community

Prakhar Khandelwal
Prakhar Khandelwal

Posted on

Explain Client-Side and Server-Side rendering Like I'm Five

Top comments (4)

Collapse
 
cjbrooks12 profile image
Casey Brooks

Server-side rendering

You ask your Mom for a peanut butter and jelly sandwich. She goes to the kitchen and comes back a few minutes later with your sandwich. You've never enjoyed a better sandwich in your life.

You didn't really have to do anything but ask for it. Your mom (the server) did all of the work (rendering) required. She found all the ingredients and assembled them into a complete sandwich for you.

Client-side rendering

You ask your Mom for a peanut butter and jelly sandwich. She goes to the kitchen and comes back with a loaf of bread, a jar of peanut butter, a jar of jelly, and a knife. She sits you down and lovingly helps you spread the peanut butter and jelly on slices of bread. You've never enjoyed a better sandwich in your life.

You did a lot of the work to make the sandwich but, but also had a little help along the way. Your mom (the server) provided all the ingredients necessary (an API), but you had to assemble them yourself (you "rendered" it).

Collapse
 
bellonedavide profile image
Davide Bellone

Client-side rendering is when you mum makes a cake in front of you.
Server side rendering is when you're mum makes a cake while you're away, and you see it when it's already done.

Collapse
 
ghost profile image
Ghost

I would say more like getting the pizza frozen or hot and ready to eat. In the case of the cake, mum did all the job in both cases, I think that would be more like interpreted vs compiled.

Collapse
 
prakhar308 profile image
Prakhar Khandelwal

Thanks for your help.
Check this out : Link
A great resource for understanding client-side and server-side rendering.