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

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

by 한민주, 양찬석, 탈 아터
April 2019
Beginner to intermediate
368 pages
7h 18m
Korean
Hanbit Media, Inc.
Content preview from 만들면서 배우는 프로그레시브 웹 앱: 사용자 경험을 극대화하는 차세대 웹 앱 기술
5
‘오프라인 우선’을 받아들이기
- 127
이 데이터는 자주 변하는 데다, 항상 접근 가능한 최신 데이터를 제공해야 하므로
network
,
falling
back
to
cache
with
frequent
updates
패턴을 선택했습
니다.
네트워크 요청의 성공과 실패에 상관없이 캐시를 엽니다. 그런 다음 네트워크로
해당 파일을 요청합니다. 네트워크 요청에 성공하면 캐시에 응답을 저장하고 반환
합니다. 실패하면 캐싱된 응답을 찾아 대신 반환합니다.
4
장의 내용을 건너뛰지 않았다면, 여기서 문제를 발견했을 것입니다. 바로
fetch
이
벤트를 가로챌 때에만
events
.
json
을 캐시한다는 점입니다. 이는 서비스 워커가 이
미 페이지를 제어하고 있을 때에만 발생합니다. 즉, 사용자가 페이지에 처음 방문했
을 때에는 파일이 캐싱되지 않습니다. 사용자의 두 번째 방문에서만 서비스 워커에
의해 캡쳐된 파일이
fetch
되도록 시도가 진행됩니다. 두 번째 방문에서 사용자가 오
프라인이라면 파일은 캐시에서 찾을 수 없을 것입니다.
서비스 워커는 캐시에 이 파일이 있는지의 여부에 좌우되기 때문에, 이 문제는
CACHED
_
URLS
배열에
events
.
json
을 추가하는 방법으로 해결할 수 있습니다. 이
방법은 서비스 워커가 설치될 때 캐싱되도록 하면 됩니다. 그다음에는 방금 ...
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