written by craig, 14 May 2008
It works using the window.name property (or, more specifically, top.name – the top-level parent frame). It appears that .name can hold a string of almost any length (depending on the browser) and the value survives between page loads – even if you visit another domain.
This means that you can serialise huge objects and store them on the client. Unlike cookies, you can also do this without sending any data to the server. It’s a very clever solution and could be used to obtain and store the user’s preferences at the start of the web application’s session.
Just remember that storing lots of session data on the client isn’t robust and it won’t be fast either!