상태를 저장하며 재방문할 때마다 다운로드할 경우 네트워크 혼잡을 일으킬 수 있는 구성 데이
터나 큰 스크립트도 클라이언트에 저장하는 것으로 옮겨가는 추세다.
많은 경우
로컬 스토리지
local
storage
라고 하는 브라우저 관리 스토리지 컨테이너를 사용해 클라이
언트의 키/값 데이터를 저장하고 액세스한다. 로컬 스토리지는 강화된 동일 출처 정책(
SOP
)
을 따른다.
SOP
는 다른 도메인(웹사이트)끼리는 로컬에 저장된 데이터에 서로 액세스하지 못
하게 한다. 웹 애플리케이션은 브라우저나 탭이 닫혀도 상태를 유지할 수 있다(그림
3
-
6
).
그림
3-6
로컬 스토리지는 강력하고 지속성 있는 키/값 저장소로 모든 현대적 브라우저에서 지원한다.
로컬 스토리지의 서브셋인
세션 스토리지
session
storage
도 똑같이 작동하되 탭이 닫히기 전까지만 데
이터를 유지한다. 같은 머신을 다른 사용자가 사용할 때 남아 있으면 안 되는 중요한 데이터를
저장할 때 세션 스토리지를 사용할 수 있다.
TIP
아키텍처가 부실하게 설계된 웹 애플리케이션에서 클라이언트 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.
O’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
I wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
I’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
I'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.