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: 웹사이트 구축을 위한 서버 사이드 자바스크립트
143
9
-
쿠키와 세션
HTTP
는 ‘상태가 없는
stateless
’ 프로토콜입니다. 즉 브라우저에서 페이지를 불러온 다음, 같은 웹
사이트에 있는 다른 페이지로 이동하더라도, 서버나 브라우저 중 누구도 같은 브라우저가 같은
사이트를 방문했음을 알 수 없다는 뜻입니다. 달리 말하자면, 웹은 원래 모든
HTTP
요청에는
서버에서 그 요청을 수행할 때 필요한 정보가 모두 들어 있다는 방식으로 움직입니다.
하지만 이건 문제입니다. 만약 이야기가 “모든
HTTP
요청에는… 들어 있다”에서 그냥 끝난다
면, 우리는 어디에도 ‘로그인’할 수 없습니다. 스트리밍 미디어도 동작하지 않을 겁니다. 웹사이
트는 페이지를 이동할 때마다 사용자 선호 설정을 전부 잊어버릴 겁니다. 따라서
HTTP
위에
‘상태’를 전송할 방법이 필요합니다. 쿠키와 세션은 이 목적에 따라 만들어졌습니다.
불행히도, 사람들이 쿠키를 써서 나쁜 일들을 했기 때문에 쿠키도 덩달아 누명을 썼습니다. ‘모
던 웹’이 제대로 동작하려면 쿠키가 꼭 필요한데 이렇듯 악명이 높아졌으니 참 불행한 일입니
다(
HTML5
에서 이와 같은 목적에 쓸 수 있는 로컬 스토리지 같은 새 기능을 도입하긴 했습니
다).
쿠키의 아이디어는 단순합니다. 서버는 정보를 조금 보내고 브라우저는 일정 시간 그 정보를
저장하는데, 그 시간은 설
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