Cookies.js

Cookies.js is a small client-side javascript library that makes managing cookies easy. https://github.com/ScottHamper/Cookies Features RFC6265 compliant Cross browser Lightweight No dependencies Public domain Supports AMD / CommonJS loaders Browser Compatibility The following browsers have passed all of the automated Cookies.js tests: Chrome Firefox 3+ Safari 4+ Opera 10+ Internet Explorer 6+ // Setting a cookie value Cookies.set('key', 'value'); // Chaining sets together Cookies.set('key', 'value').set('hello', 'world'); // Setting cookies with additional options Cookies.set('key', 'value', { domain: 'www.example.com', secure: true }); // Setting cookies with expiration values Cookies.set('key', 'value', { expires: 600 }); // Expires in 10 minutes Cookies.set('key', 'value', { expires: '01/01/2012' }); Cookies.set('key', 'value', { expires: new Date(2012, 0, 1) }); // Using the alias Cookies('key', 'value', { secure: true });


Cookies.js
http://example.com/2016-11-30 cookies-js/
作者
csorz
发布于
2016年11月30日
许可协议