Persistent Object is submitted!
Your script is now in the approval queue. After a quick review we will notify you of the script's status by email. If everything's alright, we'll publish your work to the site and rss feed. Otherwise, we'll send you the email explaining what seems questionable. In that case, reply to the email whenever we should review the script again.
Also, don't hesitate to discuss things if you feel that our reasons are unfair. We are real folk, and we don't like bureaucracy. : )
Thank you for your contribution!
1
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:
-
0
Not yet rated
- Please sign in or register to rate this script
- You can't rate your own script.