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

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

by 한민주, 양찬석, 탈 아터
April 2019
Beginner to intermediate
368 pages
7h 18m
Korean
Hanbit Media, Inc.
Content preview from 만들면서 배우는 프로그레시브 웹 앱: 사용자 경험을 극대화하는 차세대 웹 앱 기술
156 - 프로그레시브 웹 앱
몰라도 수십 개의 버전을 유지하기는 어렵습니다.
버전 간의 데이터베이스를 업그레이드하는 다른 방법은 데이터베이스의 현재 상
태를 테스트하고 필요에 따라 변경하는 방법입니다.
먼저
indexeddb
.
html
의
onupgradeneeded
메소드를 다음과 같이 변경합니
다. 이때 스크립트 첫 줄이 데이터베이스 버전
3
으로 설정되었는지 확인해주세요.
request
.
onupgradeneeded
=
function
(
event
)
{
var db
=
event
.
target
.
result
;
if
(!
db
.
objectStoreNames
.
contains
("
customers
"))
{
db
.
createObjectStore
("
customers
",
{
keyPath
:
"
passport
_
number
"
});
}
};
브라우저를 새로고침하면 데이터베이스가 에러 없이 버전
3
으로 업그레이드됩니다.
이 방법을 사용하면 변경 전에 변경이 필요한지 항상 확인할 수 있으며, 존재하지
않는 객체 저장소만 추가할 수 있게 됩니다. 이미 존재하는 인덱스의 경우에만 인
덱스를 삭제할 수 있습니다.
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