[사전 미션 - CSR을 SSR로 재구성하기] - 쑤쑤(현수연) 미션 제출합니다.#23
Open
soosoo22 wants to merge 7 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에서 초기 페이지 로딩 시간에 어떤 차이가 있었을까? 그 이유는?
SSR이 서버에서 렌더링된 html 파일을 브라우저에게 보내줍니다. 브라우저는 html 파일을 기반으로 즉시 화면을 띄어주고 js를 다운로드 받습니다. CSR은 클라이언트 측에서 js를 다운로드 받고 렌더링해서 화면에 보여줘야하기 때문에 그 과정에서 잠시 초기에 빈 화면이 보입니다. 즉, 초기 로딩 속도는 SSR이 CSR보다는 빠르다.
2. 서버 측에서 데이터를 가져오는 방식과 클라이언트 측에서 데이터를 가져오는 방식을 비교해서 설명한다면?
CSR 과정
브라우저가 서버에게 리소스 요청 => 서버가 빈 html 파일 보내줌 => 브라우저가 html 파일을 받아서 js를 다운로드 받고 렌더링함 => 렌더링이 완료되기 전까진 화면에는 빈 화면이 보임 => 사용자는 몹시 답답함 => 답답해하는 한국인 특성상 이탈자가 생길 것으로 추측 => CSR의 단점
SSR 과정
브라우저가 서버에게 리소스 요청 => 서버에서 렌더링된 html 파일을 보내줌 => 브라우저는 받은 html 파일로 화면을 띄어줌 => 그 이후 js를 다운로드 받음 => 일단 화면을 띄우고 js 파일을 다운로드 받기 때문에 사용자 입장에서는 괜찮음.