Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

Session variables without cookies. Brilliant but terrifying hack—you can store up to 2 MB of data in window.name and it persists between multiple pages, even across domains. Doesn’t work with new tabs though, and storing JSON in it and eval()ing it is a bad idea—a malicious site could populate it before sending the user to you.

Tagged , , , , ,

1 comment

  1. The other way to handle larger session data storage would be to store a randomly generated key in the session, and then use that to access server side stored data.

    I used something similar where i needed to have the effect of storing files in the session until a process was complete, so i stored them server side but accessed through a client side key when they were needed.

    Gemma K - 14th May 2008 16:12 - #

Comments are closed.
A django site