[X]

Storage Before localStorage

browser tricks 1999 partly

Before the browser had real storage, people smuggled data across pages in the window's name and hid kilobytes in an Internet Explorer behavior.

In 2026: Partly. window.name survives navigation and still holds a string, so the demo writes to it and reads it back, a genuine relic that still runs. Its partner, Internet Explorer's userData behavior, saved 64KB to a hidden store years before localStorage arrived in Internet Explorer 8, and that half is long dead. Two workarounds for a gap the platform took a decade to close.

Where it came from: window.name as transport, and Microsoft's userData behavior in Internet Explorer 5, 1999. localStorage arrived with Internet Explorer 8, 2009. MDN

<button onclick="stash()">Stash data in window.name</button>
<p id="out"></p>

<script language="JavaScript">
function stash() {
  // window.name persists across page loads and holds any string.
  // People used it as a data smuggler before sessionStorage existed.
  window.name = "cart=3;user=guest;ts=" + (new Date()).getTime();
  var msg = "window.name now holds: " + window.name;

  // The IE half: a hidden element that saved 64KB to disk. Long gone.
  var d = document.createElement("div");
  msg += (typeof d.addBehavior === "function")
    ? "<br>userData behavior available (old IE)."
    : "<br>userData behavior is gone. window.name still works.";
  document.getElementById("out").innerHTML = msg;
}
</script>
sandboxed demo · breaks nothing but itselfrestart

More in browser tricks

all 25 in browser tricks › · the whole library ›