Most cookies tend to be (or should be, as suggested by many) HttpOnly, which means that they cannot be modified or retrieved using Javascript.
Yet, there are Javascript methods available for manipulating cookies on the client-side. If Javascript cookies are indeed bad for the security, what is the use of having them?
In other words, is there any both legitimate and safe use case for Javascript cookies?
Some cookies may be valuable for preserving UI status (window size, theme, etc). There’s not much of a security issue with those.