Reputation: 257
I have setup my site to save cookies using the js-cookie plugin. However when I am in in the developer console I am able to set the cookie by using Cookies.set('name', 'value')
I want to disable this so users are unable to set/change the cookie.
Is this possible?
Upvotes: 2
Views: 506
Reputation: 1515
this is just how the console works. They are not setting the cookies forever, once they refresh things are changed.
You can also do
console.error("Oh dear, we have an error");
And you'll have an error message. But it will again only be for the current user and only until they refresh.
You can even edit the HTML and CSS, again nothing permanent.
I understand this may be concerning, but I don't think the overall impact is usually that large. In essence, anything they can see they can already do.
If you are worried about something more specific such as them gaining access then you should consider how to make that process more secure so they cannot guess what to set the value as perhaps.
Upvotes: 0
Reputation: 7661
I am pretty sure that cookies cannot be hidden. If you will look closely, a lot of big websites (as - Facebook, Google and so on)are using cookies and you can see them from your console.
Upvotes: 1