How to prevent the display of Getting framed in HTML?

Asked: Apr 15, 2023

Getting framed refers to the document that is being displayed in someone else's frameset in your HTML. This will be password protected and the permissions has to be taken before inserting the frameset. The framing of the document can be avoided by using TARGET=_top applied to all the links that will lead to the document that are outside the scope of a particular user without permission. A javaScript can be used that will automatically handle the request to remove the existing framesets. This can be given as:

if (top.frames.length!=0)

{

if (window.location.href.replace)

top.location.replace(self.location.href);

else

top.location.href=self.document.href;

}

Asked by brijesh

Answers (0)

No answers yet. Be the first to answer!