Skip to content
Myr

docs for res.cookie()

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 4c274c5 · Browse files · 3 files+15 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+15 added−0 removed

  • other:+15 added−0 removed

3 files+15 added−0 removed

modified:docs/guide.md+4 added
845 unmodified lines
846847 // "Remember me" for 15 minutes 848 res.cookie('rememberme', 'yes', { expires: new Date(Date.now() + 900000), httpOnly: true });849850The _maxAge_ property may be used to set _expires_ relative to _Date.now()_ in milliseconds, so our example above can now become:851852 res.cookie('rememberme', 'yes', { maxAge: 900000 });853854To parse incoming _Cookie_ headers, use the _cookieDecoder_ middleware, which provides the _req.cookies_ object:855856 app.use(express.cookieParser());857
324 unmodified lines
modified:docs/migrate.md+10 added
modified:History.md+1 added
1 unmodified line
22.0.0beta / 2011-03-03 3==================45 * Added HTTPS support6 * Added `res.cookie()` maxAge support7 * Added `req.header()` _Referrer_ / _Referer_ special-case, either works8 * Added mount support for `res.redirect()`, now respects the mount-point9 * Added `union()` util, taking place of `merge(clone())` combo10 * Added stylus support to express(1) generated app
480 unmodified lines