html frameset with google results “SAMEORIGIN” error

前端 未结 1 798
滥情空心
滥情空心 2021-01-28 17:55

tried to use ajax to target div but it\'s not working. So now I try to use frameset like


    

        
相关标签:
1条回答
  • 2021-01-28 18:26

    As you've identified, Google prevents framing by sending a x-frame-options:SAMEORIGIN response header. Thus, Google pages cannot be framed except in pages from the same domain (google.com).

    The X-Frame-Options response header is a security feature which cannot be bypassed in modern browsers.

    Reference

    • MDN - X-Frame-Options response header
    • Google Product Forums (2011) - Is Google.com blocking IFraming all of a sudden?

    If you want to implement Google search in your website, look into Google Custom Search.

    0 讨论(0)
提交回复
热议问题