Skip to content
This repository was archived by the owner on Feb 28, 2019. It is now read-only.
This repository was archived by the owner on Feb 28, 2019. It is now read-only.

Create Better Cookie Management Functions #8

Description

@guyfleeman

The current cookie management functions allow you to create a cookie, but has no functionality to store multiple items within a cookie. For example, within cookies.js you can find a cookie named C_BANNER_LOCAL_INFO. This represents a cookie name where we could set a corresponding value. The value should then be displayed under an info banner on the next reload/redirect. The problem is that we can't set more than one of these at the same time.

Ideally, we should be able to call some function to add multiple values under a cookie name. We should then be able to search and fetch some or all values for this cookie. This might mean storing values as KV pairs, but allowing blank keys when necessary. Any backing structure like JSON in the cookie should be abstracted away.

Functionality should include all items from the following list. The first three are currently present in cookie.js.

Direct/Simple cookie manipulation.

  • set cookie (also update cookie with single value)
  • get cookie
  • delete cookie
    Multiple value cookie manipulation.
  • add to cookie
  • remove from cookie
  • get from cookie
  • get all from cookie

If the new cookie API sufficiently handles simple cookies in the multiple cookie interface, then we can consider making the first three items private.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions