Skip to content

Instantly share code, notes, and snippets.

@thraxil
Created February 1, 2012 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thraxil/1718994 to your computer and use it in GitHub Desktop.
Save thraxil/1718994 to your computer and use it in GitHub Desktop.
cachebuster bookmarklet
javascript:window.location=window.location.href+(window.location.href.indexOf("?")==-1?"?":"&")+"__cachebuster="+parseInt(Math.random()*99999999);
@thraxil
Copy link
Author

thraxil commented Feb 1, 2012

Appends a random __cachebuster parameter to the URL. Handy for when you're forced to deal with browsers that cache in retarded ways and you're going a little bit insane always wondering why you aren't seeing the changes you made. It's a little dumb; just appends each time so if you hit it over and over, your URL just gets longer and longer. I'd welcome a patch to find/replace the existing __cachebuster parameter if it already exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment