Home  >  Article  >  Backend Development  >  javascript - How to request a page with X-Frame-Options in the blocking state.

javascript - How to request a page with X-Frame-Options in the blocking state.

WBOY
WBOYOriginal
2016-10-17 09:30:211009browse

The other party has set X-Frame-Options to disallow nesting.

In this case, it cannot be opened when loaded into an iframe using window.open(). Requests using $.get are subject to the same-origin policy.

Assume that the PHP backend is used to make the get request. It is actually an interaction between our server and the other party's server, and the client's cookies will not be cleared.

Can we only use window.open() to open a new page to complete the access?

The background is: I hope to have a page from another website that requires the user to log in again every time when entering from my entrance. So I want to secretly help the user request the other party to log out.

Reply content:

The other party has set X-Frame-Options to disallow nesting.

In this case, it cannot be opened when loaded into an iframe using window.open(). Requests using $.get are subject to the same-origin policy.

Assume that the PHP backend is used to make the get request. It is actually an interaction between our server and the other party's server, and the client's cookies will not be cleared.

Can we only use window.open() to open a new page to complete the access?

The background is: I hope to have a page from another website that requires the user to log in again every time when entering from my entrance. So I want to secretly help the user request the other party to log out.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn