For me a localStorage is, from the functional part, absolutely the same as a cookie.
So is the localStorage also covert by this law or can I use localStorage without telling the user? This would sound very weird to me.
The EU requirement is not specific to cookies, it just gets referenced by that term because it’s convenient. It applies to any technology you might use to store data on a user’s computer. It also has some exceptions which might be relevant in certain cases. This is a useful read:
Not quite though… cookies will by default get sent to the server with every request, data stored in the local storage would have to be sent explicitly using AJAX. But yeah in terms of legal rights that wouldn’t make much difference I suppose.