From: https://www.owasp.org/index.php/Clickjacking_Defense_Cheat_Sheet
In the document HEAD element, add the following:
First apply an ID to the style element itself:
<style id="antiClickjack">body{display:none !important;}</style>And then delete that style by its ID immediately after in the script:
<script type="text/javascript"> if (self === top) { var antiClickjack = document.getElementById("antiClickjack"); antiClickjack.parentNode.removeChild(antiClickjack); } else { top.location = self.location; } </script>
Comments
Comment #2
deekayen commentedComment #4
deekayen commented