0

I need to delete all the cookies and form datas when the page loads.

I have tried this one..

$.cookie('my_cookie_name', null);

Here, my_cookie_name is set to null i.e using the particular cookie name, the value is set to null. But, I need to delete all the cookies as well as form data when the page loads.

Is it possible using javascript or jquery?

UI_Dev
  • 3,317
  • 16
  • 46
  • 92
  • for clearing form data? – UI_Dev May 19 '14 at 06:59
  • document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT"; what it means? the year – UI_Dev May 19 '14 at 07:02
  • When you set a past date as expire of cookies its deleted. for you `for (var it in $.cookie()) $.removeCookie(it);` is best as you are using [jquery.cookie](http://plugins.jquery.com/cookie/) plugin – Satpal May 19 '14 at 07:04

0 Answers0