Say I have a page index.html, how can I detect, using JS or jQuery, if my page is embedded in other HTML page through a frame or an iframe?
+----------------------+
| Other people's site |
| +------------+ |
| | index.html | |
| | oops! | |
| | embedded! | |
| +------------+ |
| |
+----------------------+
window.topis the top-level window.window.selfis the window the script is executing in. If the current window is not the top-level window, it must be embedded.