document.hasUnpartitionedCookieAccess() asks whether this document already has access to third-party, unpartitioned cookies. It returns a Promise<boolean> and is part of the Storage Access API. MDN: it is a new name for hasStorageAccess().
Pass the required arguments shown below. Check return values and browser support before you rely on the result.
Syntax
Call document.hasUnpartitionedCookieAccess. Start with this line.
JavaScript
document.hasUnpartitionedCookieAccess()
Call
What it does
document.hasUnpartitionedCookieAccess()
Primary signature.
document.hasUnpartitionedCookieAccess(...)
Call with the arguments your case needs.
Built into the browser. Call hasUnpartitionedCookieAccess(...) on document — no import required.
Library declarations
JavaScript
document.hasUnpartitionedCookieAccess()
Parameters
Parameter
Description
Feature detect
Required. Limited availability name
Return Value
Return Value
Description
*
Promise resolving to boolean
JavaScript Examples
Example 1 — MDN: Granted vs Denied
Classic MDN sample using .then() on the Promise boolean.
JavaScript
document.hasUnpartitionedCookieAccess().then((hasAccess) => {
if (hasAccess) {
console.log("cookie access granted");
} else {
// you may want to call requestStorageAccess()
console.log("cookie access denied");
}
});
Pick a function. Lead with hasStorageAccess for Baseline reach.
Bind document. Keeps this correct when calling later.
Return a small object. Separates “API missing” from “access denied”.
Production tip. Call one helper; do not invoke both names on every check.
Compatibility
Browser Support
Document.hasUnpartitionedCookieAccess() is Limited availability on MDN (not Baseline). Support is mainly Chromium-based. Prefer hasStorageAccess() for wider reach. See the MDN hasUnpartitionedCookieAccess() reference.
✓ Limited availability
Document.hasUnpartitionedCookieAccess()
Newer name for the Storage Access cookie check. Feature-detect and fall back to hasStorageAccess().
LimitedNot Baseline
Google Chrome125+
Yes
Microsoft Edge125+
Yes
Opera111+
Yes
Mozilla FirefoxNot supported
No
Apple SafariNot supported
No
Internet ExplorerNot supported
No
hasUnpartitionedCookieAccess()Partial
Bottom line: Use this clearer name when present. For Firefox, Safari, and older browsers, call hasStorageAccess() instead.
Frequently Asked Questions
It returns a Promise that resolves to a boolean: true if the document has access to third-party, unpartitioned cookies; false if not. It is part of the Storage Access API (MDN).
No. MDN does not mark it Deprecated, Experimental, or Non-standard. It is Limited availability (not Baseline) because some major browsers do not ship this newer method name yet.
Yes. MDN: hasUnpartitionedCookieAccess() is a new name for Document.hasStorageAccess(). There are no current plans to remove hasStorageAccess().
No. Call it with empty parentheses: document.hasUnpartitionedCookieAccess().
Feature-detect both. Prefer hasStorageAccess() for Baseline reach (Firefox/Safari), and use hasUnpartitionedCookieAccess() when present (mainly Chromium). A small helper that tries either name is best.
MDN: storage access has not been granted already; you may want to call document.requestStorageAccess() — often from a user gesture.