Why don’t you open some websites?

Asked

Viewed 1,940 times

1

Can anyone explain to me why some websites don’t open on <iframe> and if there is any solution similar to <iframe>?

The Google and Paying, for example, do not open.

<iframe src="https://www.google.com" style="width: 100%; height: 100%;"></iframe>

2 answers

3

The Google and other sites use X-Frame-Options, a way to prevent Clickjacking, which is a sort of click theft for the user to think that they are doing an action on a particular site, but actually the clicks performed in that action are being used by the attacker to perform malicious operations.

Are applied in the header HTTP of the server for these attacks through <frame>, <iframe> or <object>.

I believe one way to get over it is by using proxy, but I can’t tell you how to do it.

0

It is possible to implement javascript code that detects whether the site is being opened in an iframe. I don’t know if Google uses this mechanism, but if it does, this could be the case.

There are also similar mechanisms for PHP and probably other server-side languages, although they are not as reliable.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.