A simple, lightweight JavaScript API for handling cookies which works in all browsers and accepts any character. It is heavily tested, has no dependency, supports ES modules and supports AMD/CommonJS. It is RFC 6265 compliant, has an useful Wiki, and enables custom encoding/decoding. More than 800 bytes gzipped! This project is RFC 6265 compliant. All special characters that are not allowed in the cookie-name or cookie-value are encoded with each one's UTF-8 Hex equivalent using percent-encoding.
The only character in cookie-name or cookie-value that is allowed and still encoded is the percent % character, it is escaped in order to interpret percent input as literal. Please note that the default encoding/decoding strategy is meant to be interoperable only between cookies that are read/written by js-cookie. To override the default encoding/decoding strategy you need to use a converter.

Features

  • Works in all browsers and accepts any character
  • Heavily tested and has no dependency
  • Supports ES modules and supports AMD/CommonJS
  • RFC 6265 compliant, has an useful Wiki
  • Enables custom encoding/decoding
  • The default encoding/decoding strategy is meant to be interoperable

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow JavaScript Cookie

JavaScript Cookie Web Site

Other Useful Business Software
Secure File Transfer for Windows with Cerberus by Redwood Icon
Secure File Transfer for Windows with Cerberus by Redwood

Protect and share files over FTP/S, SFTP, HTTPS and SCP with the #1 rated Windows file transfer server.

Cerberus supports unlimited users and connections on a single IP, with built-in encryption, 2FA, and a browser-based web client — all deployable in under 15 minutes with a 25-day free trial.
Try for Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of JavaScript Cookie!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Browser Extensions and Plugins

Registered

2021-03-11