Skip to content

Instantly share code, notes, and snippets.

@awkale
Created October 15, 2018 13:58
Show Gist options
  • Save awkale/920352203d77aa840ed14be8f79c713e to your computer and use it in GitHub Desktop.
Save awkale/920352203d77aa840ed14be8f79c713e to your computer and use it in GitHub Desktop.
#HTML #cheatsheet
<!-- The page we're linking to gains partial access to the linking page via the window.opener object. -->
target='_blank'
<!-- to prevent access, add -->
rel="noopener"
<!-- FF does not support "noopener" so add this -->
rel="noopener noreferrer"
<!-- window.open(); you're also "vulnerable" to this, so always reset the "opener" property -->
<script>
var newWnd = window.open();
newWnd.opener = null;
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment