I want to know that how can I know that my website is embedded in iFrame and remove iFrame to load my site as usual with url in address bar!
just like this one:
<iframe src="http://varzesh3.com"></iframe>
I want to know that how can I know that my website is embedded in iFrame and remove iFrame to load my site as usual with url in address bar!
just like this one:
<iframe src="http://varzesh3.com"></iframe>
You can achieve this quite easily by evaluating self
and top
, and then using replace()
to break out of the frame:
if (self !== top)
top.location.replace(self.location.href)