lz-string icon indicating copy to clipboard operation
lz-string copied to clipboard

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

Open scssyworks opened this issue 6 years ago • 1 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

scssyworks avatar May 26 '19 03:05 scssyworks

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.

stepan-sadovnykov avatar Oct 01 '19 10:10 stepan-sadovnykov