Clear the outdated data once loading the page for localStorage