Cookie is invalid because its size is too big
See original GitHub issueDescription
I have a table with 15 columns of data and the cookie extension enabled. The pagination and search bar cookies work as expected, but the show/hide column cookie does not save. On Chrome this silently fails with no messages in the console. However, Firefox is more verbose and explains the problem:
Cookie “saveId.bs.table.columns” is invalid because its size is too big. Max size is 4096 B.
Not sure if this limitation can be addressed by the dev team, or if there is something I can do on my end to work around this. This limit does not appear to be changeable on the browser side. I could change storage, but does that open up security risks? Please advise.
Example (optional)
The problem can be observed when using the following example on Firefox: https://live.bootstrap-table.com/code/knight-of-ni/4375
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top GitHub Comments
Thanks for the bug report, i submitted a PR which fix this issue.
First i thought you have weired long header columns, because it must be a lot of text for over 4096 Bytes. Then i looked into the code and so are saving the whole columns object including internal data which makes no sense. With this fix we only save the
field
attribute 😃@djhvscf this was addressed in #5262