Reputation: 339
I took the src url of an iframe containing a google map, and tried to load it in my browser, but I got this response instead:
The Google Maps Embed API must be used in an iframe.
Try it for yourself: link
How does it know that the page is being loaded in a browser, rather than a frame?
Upvotes: 0
Views: 51
Reputation: 1016
if (window==window.top) { /* I'm not in an iframe */ }
Very simple javascript.
Upvotes: 1