javascript remove local storage on window load code example Example: delete local storage javascript localStorage.removeItem(key);