HeaderDial › Guides

How to send a cookie with requests without setting it in the browser

To add a cookie to requests without storing it, click + Cookie in HeaderDial, leave the row on Send, and enter a name and value such as hd and 1. Matching requests then carry hd=1 after the cookies the browser already sends. The browser's cookie jar and document.cookie stay as they were, and unticking the row stops it at once. To have the browser save a cookie instead, as if the server had sent Set-Cookie, switch the row to Store. Cookie rows are new in HeaderDial 0.4.0 (20 November 2026): the download on the home page has them, and the store versions follow once their review finishes. In an older version, a Cookie request header with append sends extra cookies the same way (see testing with Cookie and Set-Cookie headers).

Send: what the server receives

We tested in November 2026 with HeaderDial 0.4.0 in Chrome for Testing 159.0.8154.6 and Firefox 158.0.1 on Linux. A local server logged the Cookie header of page loads and fetch() calls. Both browsers gave the same results except where a row says otherwise:

Cookies in the browserSend rowsServer received
pre=0hd=1pre=0; hd=1, on page loads and fetch()
pre=0hd=1, row untickedpre=0 (tested in Chrome)
pre=0, dup=browserhd=1, dup=extpre=0; dup=browser; hd=1; dup=ext
any, but fetch() with credentials: 'omit'hd=1, dup=exthd=1; dup=ext (tested in Chrome)

With a Send row active, document.cookie still read pre=0, and the browser's cookie store held only pre. Nothing was written, so there is nothing to clean up afterwards. The flip side: scripts on the page never see the cookie, so this tests what your server does with it, not your front-end code.

A Send row adds to the browser's cookies and never replaces one. If the browser already has a cookie with the same name, the server gets both, the browser's first. Which one your server uses depends on its cookie parser. To replace a browser cookie, use a Store row, or a Cookie header row with set as shown below.

Send rows together with a Cookie header row

A profile can have both a Cookie request header row and Send rows. HeaderDial then combines them into one change to the Cookie header. With pre=0 in the browser, both browsers sent:

Cookie header row (same profile)Send rowServer received
set fixed=abchd=1fixed=abc; hd=1
removehd=1hd=1
append extra=2hd=1pre=0; extra=2; hd=1

So remove plus Send rows sends exactly your cookies and none of the browser's. That is handy for testing one session cookie without logging out of your own.

Store: what the browser saves

A Store row adds a Set-Cookie line to every matching response, built from the name, the value and the attributes field. The browser then stores the cookie as if the server had sent it. Same browsers and set-up:

Store rowResult
st = 1, attributes Path=/Stored from a page load. Without Max-Age or Expires it is a session cookie (Chrome reported no expiry).
mx = 1, Path=/; Max-Age=3600Stored with an expiry 3,600 seconds later (tested in Chrome).
ho = 1, Path=/; HttpOnlyStored and sent on the next request, but hidden from document.cookie.
pre with an empty value, Path=/; Max-Age=0The browser's existing pre cookie was deleted.
hd = 1 and dup = ext, browser already has dup=browserBoth stored. dup=ext replaced dup=browser.
Any, after the row was deletedThe cookie stayed in the browser. Chrome kept sending it.

In Chrome, response.headers.get('set-cookie') returned null for a response with a Store row, as it does for any response: browsers never show Set-Cookie to scripts. We tested plain cookies over HTTP. We did not test Secure, Domain, SameSite or partitioned cookies.

Steps

  1. Click the HeaderDial icon. If the site-access banner appears, choose Allow on all sites or Only <current host>.
  2. Click + Cookie. A Cookies section appears with a row set to Send. Type the cookie name, then the value after the =. A value cannot contain ; or a line break: the row is marked and not applied until you fix it.
  3. To store the cookie instead, change Send to Store. An attributes field appears, filled in with Path=/. Add what you need, for example Path=/; Max-Age=3600 or Path=/; HttpOnly.
  4. Open Where it applies, click + Only on…, choose Domain and enter your host, for example staging.example.com. Without a filter, a Send row goes to every site.
  5. Reload and check the Cookie header in your server log. A Send row never appears under Application › Cookies in Chrome and Edge or Storage › Cookies in Firefox, because it is not stored; a Store row does.

The curl equivalent

In HeaderDial 0.4.0, Copy as curl… in a profile's ⋯ menu writes a command for the current tab's URL. With Send rows hd=1 and dup=ext and one Store row, it produced:

# not in curl (browser only): response cookie st
curl 'https://staging.example.com/' \
  -b 'hd=1; dup=ext'

Store rows become a comment, because they change what the browser keeps, not what is sent. By hand:

# send cookies without a cookie jar
curl -b "hd=1; dup=ext" https://staging.example.com/

# see what the server itself tries to set
curl -si https://staging.example.com/login | grep -i '^set-cookie'

Pitfalls

Keep a Cookie header row and its Send rows in the same profile. Split across two profiles, the result depended on their order and on the browser.

With pre=0 in the browser (the left profile in the profile bar has priority):

Left profileRight profileChrome 159Firefox 158
Cookie set fixed=abcSend hd=1fixed=abc; hd=1fixed=abc; hd=1
Send hd=1Cookie set fixed=abcpre=0; hd=1fixed=abc
Cookie removeSend hd=1no Cookie headerhd=1

Add to ChromeFirefox: coming soon