Am setting some Cookies using below code,
document.cookie = name+"="+value+expires+"; path=/";
Is there any way to hide them (end User should not be able to see them by checking the Cookies stored in their browsers)?
My Domain is accessed through a Load Balancer. If not through my code, in any ways it can be achieved through LB?
This question is raised keeping security aspects in mind.
If you are creating your cookies on the browser, then unfortunately there is no way to “hide” them or more specifically the data within them.
Depending on your requirements, you could implement “security through obscurity” by doing some encryption in javascript (eg. http://www.movable-type.co.uk/scripts/aes.html). This is by no means secure, but hides the cookie contents from the casual observer and non-technical sticky noses. Eg:
As @Usman Saleem commented, the only way to effectively make the cookie contents unreadable is to encrypt it on the server, before sending to the client.