Skip to Content
만들면서 배우는 프로그레시브 웹 앱: 사용자 경험을 극대화하는 차세대 웹 앱 기술
book

만들면서 배우는 프로그레시브 웹 앱: 사용자 경험을 극대화하는 차세대 웹 앱 기술

by 한민주, 양찬석, 탈 아터
April 2019
Beginner to intermediate
368 pages
7h 18m
Korean
Hanbit Media, Inc.
Content preview from 만들면서 배우는 프로그레시브 웹 앱: 사용자 경험을 극대화하는 차세대 웹 앱 기술
6 IndexedDB로 로컬에 데이터 저장하기
- 141
chapter
6
IndexedDB로 로컬에
데이터 저장하기
지금까지 앱에 필요한 데이터를 비롯한 모든 파일을
CacheStorage
에 저장했습
니다. 예약 목록을 저장하고 싶을 때는
CacheStorage
에서 해당 데이터를 담은
JSON
파일을 포함하는
HTTP
응답을 통째로 캐싱하면 됩니다. 그렇게 하면 예약
목록에 접근하고 싶을 때마다 캐시에서 파일을 가지고 올 수도 있고 파싱할 수도
있었습니다. 그런데 만약 사용자가 새로운 예약을 만들었거나 예약 상태를 변경했
다면 어떻게 될까요? 이 경우 서버에서 새로운
JSON
파일을 불러와야 합니다.
이처럼 앱이 사용자의 인터넷 연결 상태와 상관없이 완전하게 작동하지만 사소한
데이터 수정이 있을 때마다 서버에 크게 의존해야 한다면, 이를 ‘오프라인 우선’이
라고 부를 수는 없을 겁니다.
결국 브라우저에서 데이터를 지속적으로 처리할 더 좋은 방법이 필요합니다. 네트
워크에 의존하지 않고 데이터를 로컬에 저장하고, 읽고, 수정할 수 있도록 해야 합
니다.
이번 장에서는 ‘오프라인 우선’을 위해 또 하나의 중요한 도구가 될
IndexedDB
라고 불리는 로컬 데이터베이스의 사용 방법을 알아보겠습니다.
서버사이드 데이터베이스처럼,
IndexedDB
는 데이터를 구조적으로 ...
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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’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
QuotationMarkI 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
QuotationMarkI’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
QuotationMarkI'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.
Mark W.
Embedded Software Engineer

You might also like

파이썬으로 웹 크롤러 만들기: 초간단 나만의 웹 크롤러로 원하는 데이터 가져오는 방법

파이썬으로 웹 크롤러 만들기: 초간단 나만의 웹 크롤러로 원하는 데이터 가져오는 방법

한선용, 라이언 미첼

Publisher Resources

ISBN: 9791162248737