Javascript_iframe_detect is a project mainly written in JavaScript, it's free.
Detect if the html is printed inside a iframe using javascript.
Detect if the html is printed inside a iframe using javascript. This function was originally created to Facebook applications.
// To use just pass the url in the function you want to redirect if it is within an iframe.
if ( ! is_iframe) {
window.location.href = 'http://www.kanema.com.br/';
};