Skip to content

Instantly share code, notes, and snippets.

@nucular
Created March 27, 2015 19:28
Show Gist options
  • Save nucular/44bbcf6bab0f51a439e4 to your computer and use it in GitHub Desktop.
Save nucular/44bbcf6bab0f51a439e4 to your computer and use it in GitHub Desktop.
Clean Reload Bookmarklet
// This nify little bookmarklet clears the cookies, localStorage and the cache before reloading the current page.
// Make a bookmark and paste this line as the URL (note the javascript: replacing the http://)
// Cookie clearing oneliner from http://stackoverflow.com/a/27374365/2405983
javascript:(function(){ document.cookie.split(";").forEach(function(c) document.cookie=c.replace(/^ +/,"").replace(/=.*/,"=;expires="+new Date().toUTCString()+";path=/");}); for(i in window.localStorage){if (window.localStorage.hasOwnProperty(i)){delete window.localStorage[i];}} window.location.reload(true)})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment