https://github.com/dahas/js-cookie-management
A library to manage cookies with JavaScript.
https://github.com/dahas/js-cookie-management
cookie-management cookie-manager cookies
Last synced: about 1 month ago
JSON representation
A library to manage cookies with JavaScript.
- Host: GitHub
- URL: https://github.com/dahas/js-cookie-management
- Owner: dahas
- License: mit
- Created: 2016-12-01T14:56:28.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-10-20T10:05:23.000Z (over 7 years ago)
- Last Synced: 2025-01-28T05:15:39.814Z (over 1 year ago)
- Topics: cookie-management, cookie-manager, cookies
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cookie Management
A script to easily handle cookies.
## Requirements
- jQuery
## Usage
- Include the file after the jQuery library:
<script src="[your_path]/cookie_mgmt.js" type="text/javascript"></script>
- Make an instance:
var Cookie = new Cookie(name[, expDays, path]);
- Adding a value to the cookie (creates cookie, if it doesn´t exist):
Cookie.set(parameter, value);
- Reading a paramter from the cookie:
Cookie.get(parameter);
- Deleting a parameter and its value (removes the cookie, if no further parameters exist):
Cookie.clear(parameter);
- Remove the cookie:
Cookie.remove();
## License
MIT