segmentio/analytics.js — pull request #163 by calvinfo (2013-05-29 00:42:25+00:00)
Title: localStore, cookie: Replacing cookie with localStorage

A lot of our users were complaining that the cookie values
we're saving get too big. This pull request adds local storage
for all the user traits, while keeping the user id in the cookie.

The reason we separate the storage is because we want the id to
be persisted across subdomains (which localStorage can't do).
The larger traits object is kept in localStorage while the cookie
just houses the id. Users loading this javascript will delete
the old cookie set by previous versions of analytics.js