[사전 미션 - CSR을 SSR로 재구성하기] - 해시(김가연) 미션 제출합니다. #36
Open
dle234 wants to merge 5 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

CSR 의 경우 사용자는 처음에 빈 페이지를 보게 되고, 잠시 후 콘텐츠가 나타나서 초기 로딩 속도가 조금 더 걸린다고 느낀다. SSR 의 경우에는 사용자는 JavaScript 실행 전에도 콘텐츠를 볼 수 있다.
큰 차이는 못느꼈지만 실제로 SSR에서 조금 더 빠르게 느껴졌다.
2. 서버 측에서 데이터를 가져오는 방식과 클라이언트 측에서 데이터를 가져오는 방식을 비교해서 설명한다면?
서버 측 데이터 가져오는 방식 (SSR)
클라이언트가 서버에 페이지 요청 보냄 -> 서버는 필요한 데이터를 가져옴(DB) -> 가져온 데이터를 사용하여 HTML을 동적으로 생성 -> 완성된 HTML을 클라이언트에 전송 -> 브라우저는 받은 HTML을 즉시 렌더링
클라이언트 측 데이터 가져오는 방식 (CSR)
클라이언트가 서버에 초기 HTML과 JavaScript를 요청 -> 서버는 기본 HTML 과 JavaScript를 전송 -> 브라우저는 JavaScript를 실행 -> JavaScript가 서버 또는 API에서 데이터 요청 -> 데이터를 받으면 JavaScript가 동적으로 DOM을 업데이트하여 렌더링
// 내일 강의 전까지 미션 마무리하겠습니다 ㅠㅠ