Secure cookie prefixes
Applies browser-enforced naming constraints to __Secure-, __Host-, __Http-, and __Host-Http- cookies.
Support in current browsers
Checked against the current browser versions recorded in MDN browser data 8.1.5.
| Browser | Minimum | Outcome | Reason |
|---|---|---|---|
| Chrome | 155 | Works | Every required mapped BCD feature is available without a recorded qualification. |
| Edge | 154 | Works | Every required mapped BCD feature is available without a recorded qualification. |
| Firefox | 157 | Works | Every required mapped BCD feature is available without a recorded qualification. |
| Safari | 27 | Not supported | At least one required mapped feature is not available at this browser baseline. |
| Chrome for Android | 155 | Works | Every required mapped BCD feature is available without a recorded qualification. |
| Firefox for Android | 157 | Works | Every required mapped BCD feature is available without a recorded qualification. |
| Safari on iOS | 27 | Not supported | At least one required mapped feature is not available at this browser baseline. |
| Android WebView | 155 | Works | Every required mapped BCD feature is available without a recorded qualification. |
| Samsung Internet | 30.0 | Works | Every required mapped BCD feature is available without a recorded qualification. |
How support changed
Each segment groups recorded releases with the same result. Gaps between recorded versions are not filled in. This is support at each release, rather than the planner’s check of every release above a minimum.
Chrome
http.headers.Set-Cookie.host_secure_prefixes- 1 – 4848 recorded releasesNot supported
- 49 – 155106 recorded releasesWorks
http.headers.Set-Cookie.http_host-http_prefixes- 1 – 139138 recorded releasesNot supported
- 140 – 15516 recorded releasesWorks
Edge
http.headers.Set-Cookie.host_secure_prefixes- 12 – 187 recorded releasesNot supported
- 79 – 15475 recorded releasesWorks
http.headers.Set-Cookie.http_host-http_prefixes- 12 – 13967 recorded releasesNot supported
- 140 – 15415 recorded releasesWorks
Firefox
http.headers.Set-Cookie.host_secure_prefixes- 1 – 4952 recorded releasesNot supported
- 50 – 157108 recorded releasesWorks
http.headers.Set-Cookie.http_host-http_prefixes- 1 – 141144 recorded releasesNot supported
- Partial implementation
- <code>__Host-Http-</code> is supported under its original name <code>__HostHttp-</code>. See <a href="https://bugzil.la/1982555">bug 1982555</a>.
- 1421 recorded releaseWorks with limits
- Partial implementation
- <code>__Host-Http-</code> is supported under its original name <code>__HostHttp-</code>. See <a href="https://bugzil.la/1982555">bug 1982555</a>.
- 143 – 15715 recorded releasesWorks
Safari
http.headers.Set-Cookie.host_secure_prefixes- 1 – 12.121 recorded releasesNot supported
- 13 – 2740 recorded releasesWorks
http.headers.Set-Cookie.http_host-http_prefixes- 1 – 2761 recorded releasesNot supported
Chrome for Android
http.headers.Set-Cookie.host_secure_prefixes- 18 – 4825 recorded releasesNot supported
- 49 – 155106 recorded releasesWorks
http.headers.Set-Cookie.http_host-http_prefixes- 18 – 139115 recorded releasesNot supported
- 140 – 15516 recorded releasesWorks
Firefox for Android
http.headers.Set-Cookie.host_secure_prefixes- 4 – 4943 recorded releasesNot supported
- 50 – 15798 recorded releasesWorks
http.headers.Set-Cookie.http_host-http_prefixes- 4 – 141125 recorded releasesNot supported
- Partial implementation
- <code>__Host-Http-</code> is supported under its original name <code>__HostHttp-</code>. See <a href="https://bugzil.la/1982555">bug 1982555</a>.
- 1421 recorded releaseWorks with limits
- Partial implementation
- <code>__Host-Http-</code> is supported under its original name <code>__HostHttp-</code>. See <a href="https://bugzil.la/1982555">bug 1982555</a>.
- 143 – 15715 recorded releasesWorks
Safari on iOS
http.headers.Set-Cookie.host_secure_prefixes- 1 – 12.218 recorded releasesNot supported
- 13 – 2740 recorded releasesWorks
http.headers.Set-Cookie.http_host-http_prefixes- 1 – 2758 recorded releasesNot supported
Android WebView
http.headers.Set-Cookie.host_secure_prefixes- 1 – 4820 recorded releasesNot supported
- 49 – 155106 recorded releasesWorks
http.headers.Set-Cookie.http_host-http_prefixes- 1 – 139110 recorded releasesNot supported
- 140 – 15516 recorded releasesWorks
Samsung Internet
http.headers.Set-Cookie.host_secure_prefixes- 1.0 – 4.29 recorded releasesNot supported
- 5.0 – 30.043 recorded releasesWorks
http.headers.Set-Cookie.http_host-http_prefixes- 1.0 – 29.051 recorded releasesNot supported
- 30.01 recorded releaseWorks
BCD 8.1.5 · catalogue 2.3.0. Source corrections can change this trace without a new browser release.
What this feature can and cannot do
Helps protect against
- Cookie scope confusion
- Insecure cookie replacement
Does not guarantee
- All cookie tossing
- Cross-site scripting
- Weak session design
What you need before using it
- HTTPS
- Correct Secure, Path, and Domain attributes
Fallback to keep in place
Use host-only Secure cookies with narrow scope and server-side session controls.