Skip to Content
한 권으로 끝내는 Node & Express: 웹사이트 구축을 위한 서버 사이드 자바스크립트
book

한 권으로 끝내는 Node & Express: 웹사이트 구축을 위한 서버 사이드 자바스크립트

by 한성용, 이선 브라운
April 2016
Beginner to intermediate
389 pages
9h 8m
Korean
Hanbit Media, Inc.
Content preview from 한 권으로 끝내는 Node & Express: 웹사이트 구축을 위한 서버 사이드 자바스크립트
255
16
-
정적 콘텐츠
16.5.
정적 자원 전송
정적 자원의 위치를 쉽게 바꾸는 프레임워크를 만들었는데, 그러면 실제 저장하는 데 가장 좋
은 방법은 무엇일까요? 브라우저에서 자원을 캐시할지 하지 않을지, 캐시한다면 어떻게 캐시
할지 판단하는 근거인 헤더를 이해하면 도움이 될 겁니다.
|
Expires
,
Cache
-
Control
|
이 두 헤더는 브라우저가 자원을 최대 얼마나 오래 캐시할지 알려줍니다. 브라우저는 이 헤더
를 중시합니다. 이 헤더가 브라우저에
1
개월 동안 캐시하라고 지시하면, 브라우저는 자원이 캐
시에 있는 한
1
개월 동안은 다시 내려받지 않습니다. 이 기한이 되기 전에 서버에서 제어할 수
없는 이유로 브라우저가 캐시에서 이미지를 제거할 때도 있음을 꼭 알아야 합니다. 예를 들어
사용자가 캐시를 비우거나, 사용자가 더 자주 방문하는 사이트의 자원을 저장할 공간을 확보하
기 위한 브라우저의 판단으로 지울 때도 있습니다. 이들 헤더 중 하나만 쓰면 되고,
Expires
더 널리 지원되므로 이 헤더만 쓰는 게 좋습니다. 자원이 캐시에 있고 아직 저장 기한이 남아
있다면 브라우저는
GET
요청을 아예 보내지 않으므로 성능이 향상되고, 특히 모바일에서 많이
향상됩니다.
|
Last
-
Modified
,
ETag
|
이 두 태그는 일종의 버전을 제공합니다. 브라우저는 자원을 내려받기 전에 이들 태그를 먼저
확인합니다.
GET
요청은 여전히 서버로 보내지지만, 브라우저는 이들 헤더에 대한 응답으로 반
환되는 값을 확인해서 자
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

한 권으로 끝내는 Node & Express(2판): 모던 웹을 위한 서버 사이드 자바스크립트의 모든 것

한 권으로 끝내는 Node & Express(2판): 모던 웹을 위한 서버 사이드 자바스크립트의 모든 것

한선용, 이선 브라운

Publisher Resources

ISBN: 9788968482229