I am writing an iframe based facebook app. Now I want to use the same html page to render the normal website as well as the canvas page within facebook. I want to know if I
if ( window.location !== window.parent.location ) { // The page is in an iframe } else { // The page is not in an iframe }