how to delete session cookie in javascript code example
Example 1: delete session javascript
// To remove only one session
sessionStorage.removeItem('itemName');
// To remove all sessions
sessionStorage.clear();
Example 2: javascript delete cookie
function deleteCookie(name) {
document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
}