<commit_before># JavaScript Cookie [![Build Status](https://travis-ci.org/js-cookie/js-cookie.svg?branch=master)](https://travis-ci.org/js-cookie/js-cookie) [![Code Climate](https://codeclimate.com/github/js-cookie/js-cookie.svg)](https://codeclimate.com/github/js-cookie/js-cookie)

A simple, lightweight JavaScript API for handling cookies

* Works in [all](https://saucelabs.com/u/js-cookie) browsers
* [Heavily](test) tested
* No dependency
* [Unobstrusive](#json) JSON support
* Supports AMD/CommonJS
* [RFC 6265](http://www.rfc-editor.org/rfc/rfc6265.txt) compliant
* Enable [custom decoding](#converter)
* **~800 bytes** gzipped!

**If you're viewing this at https://github.com/js-cookie/js-cookie, you're reading the documentation for the master branch.
[View documentation for the latest release (1.5.0).](https://github.com/js-cookie/js-cookie/tree/v1.5.0)**

## Build Status Matrix

[![Selenium Test Status](https://saucelabs.com/browser-matrix/js-cookie.svg)](https://saucelabs.com/u/js-cookie)

## Installation

Include the script (unless you are packaging scripts somehow else):

```html
<script src="/path/to/js.cookie.js"></script>
```

**Do not include the script directly from GitHub (http://raw.github.com/...).** The file is being served as text/plain and as such being blocked
in Internet Explorer on Windows 7 for instance (because of the wrong MIME type). Bottom line: GitHub is not a CDN.

The plugin can also be loaded as an AMD or CommonJS module.

js-cookie support [npm](https://www.npmjs.com/) and [Bower](http://bower.io/) under the name `js-cookie`

## Basic Usage

Create a session cookie, valid to the current page:<commit_msg>This is not a "plugin" anymore...<commit_after># JavaScript Cookie [![Build Status](https://travis-ci.org/js-cookie/js-cookie.svg?branch=master)](https://travis-ci.org/js-cookie/js-cookie) [![Code Climate](https://codeclimate.com/github/js-cookie/js-cookie.svg)](https://codeclimate.com/github/js-cookie/js-cookie)

A simple, lightweight JavaScript API for handling cookies

* Works in [all](https://saucelabs.com/u/js-cookie) browsers
* [Heavily](test) tested
* No dependency
* [Unobstrusive](#json) JSON support
* Supports AMD/CommonJS
* [RFC 6265](http://www.rfc-editor.org/rfc/rfc6265.txt) compliant
* Enable [custom decoding](#converter)
* **~800 bytes** gzipped!

**If you're viewing this at https://github.com/js-cookie/js-cookie, you're reading the documentation for the master branch.
[View documentation for the latest release (1.5.0).](https://github.com/js-cookie/js-cookie/tree/v1.5.0)**

## Build Status Matrix

[![Selenium Test Status](https://saucelabs.com/browser-matrix/js-cookie.svg)](https://saucelabs.com/u/js-cookie)

## Installation

Include the script (unless you are packaging scripts somehow else):

```html
<script src="/path/to/js.cookie.js"></script>
```

**Do not include the script directly from GitHub (http://raw.github.com/...).** The file is being served as text/plain and as such being blocked
in Internet Explorer on Windows 7 for instance (because of the wrong MIME type). Bottom line: GitHub is not a CDN.

js-cookie supports [npm](https://www.npmjs.com/) and [Bower](http://bower.io/) under the name `js-cookie`

It can also be loaded as an AMD or CommonJS module.

## Basic Usage

Create a session cookie, valid to the current page:
{'fraction_non_alphanumeric': 0.15391539153915393, 'fraction_numerical': 0.010801080108010801, 'mean_word_length': 4.650847457627119, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 20, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6732192', 'n_tokens_mistral': 1110, 'n_tokens_neox': 1047, 'n_words': 307}