Is the meta tag for the target window used to decompress frames?

Does adding a followin tag in the header section of an html document prevent the document from loading inside the frame? If so, why is anyone worried about Javascript methods?

<META HTTP-EQUIV="Window-target" CONTENT="_top" />
+3
source share
2 answers

It seems that browsers no longer support the meta tag <META HTTP-EQUIV="Window-target" CONTENT="_top" />, they just ignore it. So, why do people worry about using JavaScript, as Gumbo suggested.

+2
source

Better to use BASEelement instead:

<base target="_top">

. _top , .

, , JavaScript:

if (top != self) {
    top.location.href = self.location.href;
}
+3

Source: https://habr.com/ru/post/1719308/


All Articles