Skip to content

Instantly share code, notes, and snippets.

@jdunck
Created May 21, 2010 20:49
Show Gist options
  • Save jdunck/409401 to your computer and use it in GitHub Desktop.
Save jdunck/409401 to your computer and use it in GitHub Desktop.
Anti-clickjacking code recommended by http://seclab.stanford.edu/websec/framebusting/
<style>
html {visibility:hidden;}
</style>
<script>
if(self==top) {
document.documentElement.style.visibility='visible';
} else {
top.location=self.location;
}
</script>
@jdunck
Copy link
Author

jdunck commented May 21, 2010

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