This breakdown is a useful way to think about application state in the browser. Another axis that could be incorporated into the model is lifetime. There is some overlap between Server-Controlled and Script-Controlled realms in cookies, applications definitely have a dependency on that overlap being there. There are two constructs not represented in your writeup, Database and ApplicationCache.<div>
<br></div><div><span class="Apple-style-span" style="border-collapse: collapse; ">> Possible solutions would be to add a new "documentStorage" to<br>> WebStorage, or to offer a History.setDocumentState method.</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">I see other possibilities with WebStorage too.</span></div><div>
<span class="Apple-style-span" style="border-collapse: collapse;"><div> "documentStorage" has persistent lifetime + document scope</div><div>others...</div><div> transient lifetime + document scope (transient does not survive a browser restart)</div>
<div> transient lifetime + user agent scope "temporaryStorage"</div><div> transient lifetime + history entry scope "privateStorage"</div><div><br></div></span></div>