[사전 미션 - CSR을 SSR로 재구성하기] - 프룬(변민지) 미션 제출합니다.#22
Open
chosim-dvlpr wants to merge 12 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤔 생각해 보기
1. CSR과 SSR에서 초기 페이지 로딩 시간에 어떤 차이가 있었을까? 그 이유는?
csr보다 ssr이 미세하게 더 빨랐던 것 같아요. ssr은 서버에서 렌더링 된 js 파일을 미리 전달받기 때문이라고 생각합니다.
2. 서버 측에서 데이터를 가져오는 방식과 클라이언트 측에서 데이터를 가져오는 방식을 비교해서 설명한다면?
ssr
서버 측에서 데이터를 가져오는 SSR 방식은 서버가 데이터를 처리하고 HTML을 생성한 뒤 이를 완성한 형태로 클라이언트에게 전달합니다. 클라이언트는 서버에서 제공한 HTML을 바로 렌더링할 수 있어 초기 로딩 속도가 빠릅니다.
csr
CSR 방식에서는 서버가 기본 HTML과 자바스크립트를 보내고 브라우저가 자바스크립트를 실행해 필요한 데이터를 API 요청 등을 통해 비동기로 가져옵니다. CSR은 초기 데이터 로딩까지의 시간이 더 오래 걸리지만, 데이터가 자주 바뀌는 경우에는 유연하게 클라이언트에서만 업데이트할 수 있다는 장점이 있습니다.