1.1.0 • Published 9 years ago

derby-cookie-tracker v1.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

Derby Cookie Tracker

Attach a cookie id to a Derby JS app's browser session. Works in both the client and server, so that you can track compiled derby apps that start offline. This is useful for logging, tracking errors on devices, etc.

Installation

npm install derby-cookie-tracker --save

Usage

var derby = require('derby');
var cookieTracker = require('derby-cookie-tracker');

var app = derby.createApp('app', __filename);
app.use(cookieTracker())

Updating

If you mutate the cookie id the module will update your browser cookie. i.e.:

model.set('$cookie.id', 'foo');
// document.cookie "$cookie.id=foo"

Options

path - Where to store the cookie id. Defaults to $cookie.id;

Notes

This cookie is not httpOnly and isn't secure. It shouldn't be used as a session id or to access private data.

1.1.0

9 years ago

1.0.0

9 years ago

0.1.3

9 years ago