It seems that the 'show/hide marc tag field' enhancement, introduced by bug 9366, uses cookie when the HTML5 localStorage DB could be used.
The only reason I can think of that we would want to change this is if we're concerned about the 365-day expiration of these cookies. Is there another factor behind this bug?
Cookies are returned to the server, then back to the client. I do not think we should use them when not needed, here it is only needed client-side, and can be replaced with local storage. Also, privacy, useless data going through the network, etc.
Same for search_path_code
(In reply to Jonathan Druart from comment #3) > Same for search_path_code Agreed. Seeing useless warnings like this one too: [2022/10/27 00:49:23] [WARN] ReturnPath switch error at /usr/share/koha/opac/opac-search.pl line 215. Caused by an unexpected value in search_path_code.
(In reply to Jonathan Druart from comment #2) > Cookies are returned to the server, then back to the client. > > I do not think we should use them when not needed, here it is only needed > client-side, and can be replaced with local storage. > > Also, privacy, useless data going through the network, etc. I've been thinking about this lately, and the only issue I can think of relates to shared devices. In the case of the staff interface, you can have shared circ terminals, although it's probably not a drama. I'm thinking more about public OPAC terminals at libraries. If a user closes the browser, I don't think the local storage gets cleared. HTML5 session storage might work although I think its scoping differs a fair bit from session cookies. I suppose it'll differ on a case by case basis... Anyway, I think it would be interesting to take advantage of local storage and session storage more often for sure.