js - How to prevent embedding my web page inside an iframe? - Stack Overflow

28th October 2011 – 45 words
if (window.top !== window.self) {
  window.top.location.replace(window.self.location.href);
}

Reposted from notes.it-jobs-und-stellen.de