Security & Privacy

sandbox="allow-storage-access-by-user-activation"

Allows the frame to request access to unpartitioned storage through the Storage Access API after user activation where supported. Permission, other sandbox flags and browser privacy rules still govern access. A space-separated token list on iframe. An empty sandbox imposes the full sandbox restrictions; each token removes a particular restriction, not all restrictions. This inert srcdoc demonstrates syntax only, not the granted capability.

Formal Syntax & Structure

html syntaxhtml
sandbox="allow-storage-access-by-user-activation"

Parameters & Attributes

NameTypeDescription
sandboxspace-separated token listAllows the frame to request access to unpartitioned storage through the Storage Access API after user activation where supported. Permission, other sandbox flags and browser privacy rules still govern access.

Working Example

Example Snippethtml
<iframe title="Isolated example" sandbox="allow-storage-access-by-user-activation" srcdoc="&lt;p&gt;Embedded content&lt;/p&gt;"></iframe>

Browser Compatibility

Minimum supported versions across modern rendering engines

Chrome
113
Yes
Firefox
65
Yes
Safari
11.1
Yes
Checked desktop BCD snapshot: iframe sandbox token allow-storage-access-by-user-activation. Versions denote the recorded start of support (≤ means at least that early), not a guarantee of all behavior. Unresolved mirror and preview rows omitted. Token support does not guarantee permission to perform the action in every context.
HTML Living Standard
HTML Reference