How do deactivate the internal cookie jar altogether?

Hi there,

my service sets cookies after authentication and I’d like k6 to completely ignore those cookies.
How can I achieve that?

Hi @emil,
welcome to the community forum :tada:

k6 doesn’t have an explicit feature for clear cookies but as a work-around, you could set a local cookie jar or you could set an empty value for the specific case, as the following code:

export default function() {
  const jar = http.cookieJar();
  jar.set('', 'my_cookie', '')

You can find more details about using cookies on the dedicated documentation page.