簡體   English   中英

html框架集與谷歌搜索結果“SAMEORIGIN”錯誤

[英]html frameset with google results “SAMEORIGIN” error

試圖使用ajax來瞄准div,但它沒有用。 所以現在我嘗試使用frameset

<frameset border=0 rows="300, *">
    <frame src="search.html" name="top" target="bottom">
    <frame src="bottom.php"  name="bottom">
</frameset>

search.html有一個表單,輸入和提交按鈕。 我想看看谷歌的結果在底部。

bottom.php位於下方以重定向。

<?php  
   header( 'Location: http://www.google.com/scholar' ) ;
?>

Nytimes.com,bing.com和其他人都很好。 但只有google.com有“SAMEORIGIN”錯誤。

擁有它的最佳解決方案是什么?

提前致謝。

正如您x-frame-options:SAMEORIGIN ,Google通過發送x-frame-options:SAMEORIGIN響應標頭來阻止框架。 因此,除了來自同一域( google.com )的網頁外,Google網頁無法加框。

X-Frame-Options響應頭是一種安全功能,在現代瀏覽器中無法繞過。

參考


如果您想在自己的網站上實施Google搜索,請查看Google自定義搜索

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM