Skip to content

Sudrien/biscuit

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
Biscuit

By Sudrien

Making cookies more accessable within the Prototype JavaScript Framework
http://github.com/sudrien/biscuit

--

Normally, cookies are availble as a monolithic string. Biscuit makes
cookies accessible as a hash. It has been tested with Prototype 1.6.1
so far.

--

Usage:
document.cookies().get('cookie_index');
document.cookies().unset('cookie_index');
document.cookies().set('cookie_index','value', {params});

Supported params
expires: date. Converted to max-age. Overridden by max-age.
max_age: integer. Time in second until cookie expires. If not set, cookie expires when browser closes.
path: string. No paths outside this will have access to cookie.
domain: string. No subdomains outside this will have access to cookie. 
secure: boolean. If true, only send on https requests.

--

Todo:
- derive scope from linking page, if unspecified
- test for proper scope
- test in IE & Webkit


Refrences:
https://developer.mozilla.org/En/Document.cookie
http://php.net/manual/en/function.setcookie.php
http://www.w3.org/Protocols/rfc2109/rfc2109

About

Cookie handling for Prototype js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published