Originally posted by Ravi Kumar R.S:
Hello Gray Man,
Server-side cookies means cookies set through servlets using cookie api.What are the advantages of javascript cookies over server-side cookies.Awaiting your reply.
Regards,
Ravi
Well, you already know about server side cookies using servlets/JSP, with client side JavaScript, you instruct the JavaScript/JScript engine of the browser to place a cookie for you, so the code will essentially be executed on the client-side. With server side cookie, the cookie is set through HTTP header. If the client browser has disabled JavaScript, setting cookies via JavaScript won't work. JavaScript cookies come in handy when your web-server (free or low cost web server) does not allow you to use a server side programming.
Obviously, if cookies are disabled, both the approaches won't work. You can read more about JavaScript cookies here -
http://www.geocities.com/technofundo/tech/js/jscookies.html see if it is of any help.
- Manish