---
title: "Discussion on \"Clearing Cookie in Next.js\" | Hashnode"
description: "Discussion on \"Clearing Cookie in Next.js\". Like any other header, a cookie is also a header that web apps use to store essential information. If you want to clear a cookie from server-side in Next.js (which uses node.js under the hood) you can simply use response's setHeader method like so:\nr..."
url: "https://hashnode.com/posts/clearing-cookie-in-nextjs/61fbb2d96369bcac42230723"
---

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

Discussion

# [Clearing Cookie in Next.js](https://vamsirao.com/clearing-cookie-in-nextjs?utm_source=hashnode&utm_medium=feed)

Like any other header, a cookie is also a header that web apps use to store essential information. If you want to clear a cookie from server-side in Next.js (which uses node.js under the hood) you can simply use response's setHeader method like so: r...

Feb 3, 2022 · 1 min read · vamsirao.com  
Updated Nov 26, 2024  
Read the article

-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#nodejs](https://hashnode.com/tag/nodejs)

## Written by

[Vamsi Rao](https://hashnode.com/@vamsirao)

@vamsirao · India

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

👨‍💻 Developer @hashnode

developer learning to build great products

## Responses 1

Markdown supported · ⌘↵ to post

[Vamsi S](https://hashnode.com/@vamsi7)

[Apr 24, 2024](https://hashnode.com/posts/clearing-cookie-in-nextjs/61fbb2d96369bcac42230723/comment/6628e5c3361a478ef027f6c5)

Nice article
