Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 785 Bytes

readme.md

File metadata and controls

39 lines (26 loc) · 785 Bytes

FlashCookie.js

JavaScript interface library to manage persistent cross-browser Flash cookies.

Method

  • get(key)
  • set(key, value)
  • remove(key)
  • clear()

Example

<script type="text/javascript" src="flash-cookie.min.js"></script>
<script type="text/javascript">
    FlashCookie.onReady(function (cookie) {
        cookie.set("key1", "value1");
        cookie.set("key2", "value2");

        console.log(cookie.get("key1"));    // "value1"

        cookie.remove("key1");

        console.log(cookie.get("key1"));    // undefined
        console.log(cookie.get("key2"));    // "value2"

        cookie.clear();

        console.log(cookie.get("key2"));    // undefined
    });
</script>

License

MIT License

Copyright © 2013 Faisalman <[email protected]>