Reputation: 147
Please Is there a way to clear a particular cookie with JavaScript and it is compatible with all browsers? I am using .NET to register the script during pre_load.
Upvotes: 0
Views: 316
Reputation: 1840
I believe this should suffice:
<script type="text/javascript">
function delete_cookie( name ) {
document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
}
</script>
Upvotes: 1