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

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

by 한민주, 양찬석, 탈 아터
April 2019
Beginner to intermediate
368 pages
7h 18m
Korean
Hanbit Media, Inc.
Content preview from 만들면서 배우는 프로그레시브 웹 앱: 사용자 경험을 극대화하는 차세대 웹 앱 기술
056 - 프로그레시브 웹 앱
사용자에게 이를 보여주려면 실패한
request
를
catch
하고 대체 콘텐츠를 반환
해야 합니다.
self
.
addEventListener
("
fetch
",
function
(
event
)
{
event
.
respondWith
(
fetch
(
event
.
request
).
catch
(
function
()
{
return fetch
("/
index
-
offline
.
html
");
})
);
});
다만, 이 코드에는 문제점이 있습니다. 눈치채셨나요?
코드가 아닌 로직에 에러가 있습니다. 사용자가 오프라인이라는 것을 알고 있을
때만 오프라인 파일을 가져오는데, 그러려면 사용자가 온라인일 때 오프라인 파일
을 가져와 사용자 기기에 저장한 후 사용자가 오프라인일 때 이 파일을 제공해야
합니다.
사용자 기기에 콘텐츠를 저장하기 위한 ‘그 어딘가’가 비어있던 퍼즐의 한 조각
이었는데요. 다행히도 서비스 워커가 소개되면서, 필요했던 퍼즐의 한 조각으로
CacheStorage
API
를 사용할 수 있게 되었습니다.
3.1
CacheStorage란 무엇인가
CacheStorage
는 개발자가 완전히 제어할 수 있는 새로운 형태의
캐싱 레이어
caching layer
입니다.
이전 브라우저에도 캐시가 있었습니다. 이 캐시는 백그라운드에서 쉴 새 없이 돌
면서 어떤 파일을 캐싱할 지, ...
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