Page 1 of 1

Check if a page is loaded in an iframe

Wojtek on iframe, redirect, window · 30.06.2011 · Comments · 1 min read

A quick tip, how to check if current page has been loaded in an iframe or was it accessed directly. if (window.self === window.top) { // we're NOT in an iframe } else { // we're in an iframe } That’s it.... Read more »

Page 1 of 1

All your code are belong to us

All your code are belong to us

Thoughts, stories and ideas on code and technology in general.
Blog title inspired by this meme

Search

Recent posts

  • Install latest Python version on Raspberry Pi 4 months ago
  • Configure local website on WSL2 with PHP and nginx 2 years ago
  • Upgrade Raspbian from Jessie to Stretch 2 years ago
  • Install any version of NodeJS and npm on Raspberry Pi 2 years ago
  • VueJS pass data and methods to child component 2 years ago
  • Check laptop battery health on Windows 10 3 years ago
All your code are belong to us © 2022
Proudly published with Ghost. Theme: Strider by Mataba and SixBytesUnder.