# Cookies not saved in Recording Simulation

**URL:** https://community.gatling.io/t/cookies-not-saved-in-recording-simulation/8617
**Category:** Gatling (Open-Source)
**Created:** [January 11, 2024, 10:37am UTC](https://community.gatling.io/t/cookies-not-saved-in-recording-simulation/8617 "2024-01-11T10:37:59Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rvsingh](https://avatars.discourse-cdn.com/v4/letter/r/f4b2a3/32.png) [@rvsingh](https://community.gatling.io/u/rvsingh)
#### Post date: [January 11, 2024, 10:37am UTC](https://community.gatling.io/t/cookies-not-saved-in-recording-simulation/8617/1 "2024-01-11T10:37:59Z")

</div>

Hello all,  
I am trying to do a recording simulation in HAR converter mode.  
The HAR file has all the cookies but the generated simulation does not have cookies in request.  
Am i missing some thing here?

---

<div class="post-metadata">

### Author: ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)
#### Post date: [January 11, 2024, 10:55am UTC](https://community.gatling.io/t/cookies-not-saved-in-recording-simulation/8617/2 "2024-01-11T10:55:52Z")

</div>

> Am i missing some thing here?

Yes, 2 things:

- that Gatling handles cookies automatically (cookies sent from the server are automatically stored and sent back on the matching requests)
- that cookies are only valid for a short period of time and in a given context, so they mustn’t be hardcoded in the test. You must either include your authentication process in your scenario so your virtual users each get a fresh cookie, or populate your cookies manually (weird, but well), with the [addCookie](https://gatling.io/docs/gatling/reference/current/http/helpers/#adding-a-cookie).

---

<div class="post-metadata">

### Author: ![system](https://europe1.discourse-cdn.com/flex013/uploads/gatling2/original/2X/b/b148e0742de35c6280726cabf3ecd3de2d320f63.png) [@system](https://community.gatling.io/u/system)
#### Post date: [February 10, 2024, 10:56am UTC](https://community.gatling.io/t/cookies-not-saved-in-recording-simulation/8617/3 "2024-02-10T10:56:24Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
