Skip to content

Instantly share code, notes, and snippets.

@0x4a
Created June 1, 2014 20:19
Show Gist options
  • Save 0x4a/b81ef5ec275ab6150c94 to your computer and use it in GitHub Desktop.
Save 0x4a/b81ef5ec275ab6150c94 to your computer and use it in GitHub Desktop.
#bookmarklet to reload CSS without refreshing the page - #js #css
//http://www.paulirish.com/2008/how-to-iterate-quickly-when-debugging-css/
javascript:(function(){var%20h,a,f;a=document.getElementsByTagName('link');for(h=0;h<a.length;h++){f=a[h];if(f.rel.toLowerCase().match(/stylesheet/)&&f.href){var%20g=f.href.replace(/(&|%5C?)forceReload=\d+/,'');f.href=g+(g.match(/\?/)?'&':'?')+'forceReload='+(new%20Date().valueOf())}}})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment