The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,227 other subscribers

html frames and iframes from other sites that won’t load: some links

Posted by jpluimers on 2020/05/14

Back in the days, framing stuff from other sites would just work. Nowadays, often they don’t because of a variety of reasons, often the site not wanting to be embedded, which is OK with me.

But it pays knowing what they do and how they do it, to ensure it is not an accidental setting of the address bar URL to the wrong value like in

  if(top != window) {
    top.location = window.location
  }

So here are some links for me to dig deeper when I encounter framing issues again:

My basic idea for a workaround is to go through a proxy.

It looks like others had this idea too, so some links future reading via cors proxy – Google Search:

–jeroen


<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
</head>
<body style="margin:0px;padding:0px;overflow:hidden">
<iframe src="__URL_HERE__" frameborder="0" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;height:100%;width:100%;position:absolute;top:0px;left:0px;right:0px;bottom:0px" height="100%" width="100%"></iframe>
</body>
</html>

view raw

index.htm

hosted with ❤ by GitHub

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: