Framekiller - First Framekillers

First Framekillers

Historically, the first framekiller scripts were as simple as this:

The logic here was to show display the page, but check if the top location is the same as the current page, and replace the top by current if not.

There were many variations of this script. This example is cross-browser compatible, avoids deprecated objects, and uses replace which preserves the user's back-button. Comparing object references, top, self and location directly is slightly more efficient, and succinct.

Read more about this topic:  Framekiller