Showing 179 scripts

Sort by name or size

Persistent Object

Persistent Object

This script provides a mechanism for persisting Javascript objects between requests. A supertype object is defined which can be easily subclasseed (using Prototype) to create simple Active-record-like objects which can be saved, reloaded on a future request and deleted. Persistence is provided using a JSON-encoded cookie backend (similar to the existing Cookie Jar extension). The properties of an object are serialised and stored in a cookie identified by a key. Of course, due to the limitations associated with cookies, this isn't going to be suitable for all Javascript applications; however, the persistence provided is certainly useful. All feedback welcome.
Website:
Persistent Object
Author:
David Winterbottom
Size:
5 KB
Last modified:
01/06/2009
License:
Creative Commons Attribution-ShareAlike 2.5
Tags:
cookies, JSON
Rating:
0
(0/5 from 0 votes)
Your rating:
Please sign in or register to rate this script
Select multiple tags with Ctrl+click (Cmd+click on Mac)

Found a bug or have a suggestion?Let us know

bitsonnet corp · © 2007-2014 · all rights reserved

Sign In / Register / Forgot password