pieroxy / lz-string

LZ-based compression algorithm for JavaScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

compressToUTF16 doesn't work in Internet Explorer when storing in cookies

scssyworks opened this issue · comments

I am facing issues when compressing and storing values in cookies. I am using compressToUTF16 which works very well with localStorage however fails with cookies.

Browser: IE11
lz-string version: latest

Seems like IE doesn't allow Unicode (UTF-16 including) in cookies. For details see https://stackoverflow.com/questions/1969232/allowed-characters-in-cookies . I'd recommend to use compressToBase64 if you need to store compressed info in cookies.