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
Zenflow- The AI Workflow Engine for Software Devs Icon
Zenflow- The AI Workflow Engine for Software Devs

Parallel agents. Multi-agent orchestration. Specs that turn into shipped code. Zenflow automates planning, coding, testing, and verification.

Zenflow is the AI workflow engine built for real teams. Parallel agents plan, code, test, and verify in one workflow. With spec-driven development and deep context, Zenflow turns requirements into production-ready output so teams ship faster and stay in flow.
Try free now
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