Rohan

Rohan

  • 1.1k
  • 1.3k
  • 37.5k

Clear cookies in using jquery.

Dec 22 2021 9:53 AM

Hello everyone I have use this code for clear cookies but cookies not clear.

 $(document).ready(function () {       
        var contactUs=localStorage.getItem("");
        if(contactUs=="true")
        {    
         localStorage.removeItem("contact");
            setTimeout(function () {
                debugger
             $.removeCookie("AspNetCore.Identity.Application");
            window.location = "";
        }, 10000);
        }
    });


Answers (5)