---
title: "Discussion on \"HttpOnly 쿠키\" | Hashnode"
description: "Discussion on \"HttpOnly 쿠키\". HttpOnly 쿠키는 웹 서버가 HTTP 응답 헤더를 통해 설정하는 쿠키이다. 해당 쿠키는 클라이언트 측에서 자바스크립트로 접근할 수 없고, 오직 HTTP 요청을 통해서만 서버로 전송된다.\n서버에서 accessToken이라는 쿠키를 httpOnly로 설정할 경우, 아래와 같이 해당 쿠키는 자바스크립트로 쿠키를 확인할 수 없다.\n\n\n클라이언트에서 자바스크립트로 접근할 수 없기 때문에 Cross-site 스크립팅(XSS) 공격을 방지할 수 있다...."
url: "https://hashnode.com/posts/httponly/65810eab346de2b5913dd9bf"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [HttpOnly 쿠키](https://nakkim.hashnode.dev/httponly?utm_source=hashnode&utm_medium=feed)

HttpOnly 쿠키는 웹 서버가 HTTP 응답 헤더를 통해 설정하는 쿠키이다. 해당 쿠키는 클라이언트 측에서 자바스크립트로 접근할 수 없고, 오직 HTTP 요청을 통해서만 서버로 전송된다. 서버에서 accessToken이라는 쿠키를 httpOnly로 설정할 경우, 아래와 같이 해당 쿠키는 자바스크립트로 쿠키를 확인할 수 없다. 클라이언트에서 자바스크립트로 접근할 수 없기 때문에 Cross-site 스크립팅(XSS) 공격을 방지할 수 있다....

Dec 19, 2023 · 1 min read · nakkim.hashnode.dev  
Updated Dec 21, 2023  
Read the article

-   [#http](https://hashnode.com/tag/http)
-   [#httponly](https://hashnode.com/tag/httponly)

## Written by

[Kim Nakyeong](https://hashnode.com/@nakkim)

@nakkim

  
[View profile](https://hashnode.com/@nakkim)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
