Published in: JavaScript
URL: http://www.thomasfrank.se/sessionvars.html
"I never liked the JavaScript implementation of cookies. The storage space is limited (4 x 20 Kb per domain), the only data format that can be used is a string and the syntax for setting and getting cookies is unnecessarily complicated. On top of that they get added to the browser request header - and since a lot of corporate firewalls only accept a rather limited request header length they might prevent your pages from loading at all. (I've seen it happen - it's ugly.) So I've made a small script that let you use JavaScript session variables without using cookies. It will let you store 2 MB of data, with much less hassle than a cookie based solution."
<head> <script type="text/javascript" src="sessionvars.js"></script> ... </head>
Comments
Subscribe to comments
You need to login to post a comment.

Very good script, but unfortunately session data are not restored if user opens anything in new window/tab.