To remove cookie from server one need to set its expiry time to current time.
e.g. J2EE container one can remove the cookie in following way
HttpServletResponse response = (HttpServletResponse) servletResponse; Cookie cookie = new Cookie("cookie-key", ""); .... set all the other attributes same as that of existing cookie, like path and domain. cookie.setMaxAge(0); response.addCookie(cookie);
setting max age of cookie to '0' I am setting its expiry to current machine time.
JavaScript
document.cookie = "username=; expires=Thu, 01 Jan 1970 00:00:00 GMT";
For more details refer
شركة مكافحة النمل الابيض غرب الرياض
ReplyDeleteشركة مكافحة النمل الابيض شرق الرياض
شركة مكافحة النمل الابيض بالمدينة المنورة
شركة رش مبيدات جنوب الرياض
شركة رش مبيدات شمال الرياض
شركة رش مبيدات وسط الرياض
شركة رش مبيدات غرب الرياض
شركة رش مبيدات شرق الرياض
شركة مكافحة حشرات جنوب الرياض
شركة مكافحة حشرات شمال الرياض
شركة مكافحة حشرات وسط الرياض
شركة مكافحة حشرات غرب الرياض