iFrame not loading URL

前端 未结 5 856
心在旅途
心在旅途 2020-12-28 15:41

I am using the following simple iFrame code to load Yahoo but it\'s not loading anyway. in Chrome Inspector I see the URL status as 301 first and then cancel. Any idea why i

5条回答
  •  不知归路
    2020-12-28 16:09

    You probably get an error message in the log that reads something like this:

    "Refused to display document because display forbidden by X-Frame-Options."

    To answer your question:

    Yahoo is doing this to avoid clickjacking attacks, by ensuring that their content is not embedded into other sites.

    For more info read this: https://developer.mozilla.org/en/The_X-FRAME-OPTIONS_response_header

提交回复
热议问题