How to prevent iframe thieves?
Hey,
This is what i found on internet:
- <script>
- if (self == top) {
- var theBody = document.getElementsByTagName('body')[0]
- theBody.style.display = "block"
- } else {
- top.location = 'http://google.com'
- }
- </script>
I would like to get
if self url = mywebsite.com or mywebsite2.com
show iframe
else block iframe
error message
What is the best way to do that?
Thanks!