【问题标题】:Iframe failure when embedding Google Scholar web in other web using Wordpress使用 Wordpress 将 Google Scholar 网页嵌入其他网页时,iframe 失败
【发布时间】:2019-06-24 20:53:32
【问题描述】:

我有自己的个人作品集 (modestomata.com),我想在我的一些页面中包含一个 iframe 以及其他网站。例如,当我尝试将这个网站 (http://www.vivaelsoftwarelibre.com) 嵌入到 iframe 中时,效果很好:

<iframe src="http://www.vivaelsoftwarelibre.com" width="420" height="315" frameborder="0" allowfullscreen="allowfullscreen">
    <iframe>

但是,当我尝试将我的个人 Google Scholar 页面 (https://scholar.google.es/citations?user=v4UtSKUAAAAJ&hl=en) 嵌入到我的作品集页面时,我得到一个空白 iframe。

<iframe src="https://scholar.google.es/citations?user=v4UtSKUAAAAJ&hl=en" width="420" height="315" frameborder="0" allowfullscreen="allowfullscreen">
<iframe>

那么,如何让 iframe 在其他页面中显示我的 Google Scholar 网页?

【问题讨论】:

  • 如果您检查开发工具,您将看到“拒绝在框架中显示 'scholar.google.es/citations?user=v4UtSKUAAAAJ&hl=en',因为它将 'X-Frame-Options' 设置为 'sameorigin'。”
  • 有什么办法可以解决这个问题吗?
  • X-Frame-Options 是从其服务器发送的响应标头。
  • 所以,不可能吧?

标签: html wordpress iframe google-scholar


【解决方案1】:

您可以使用此站点 (https://iframely.com/embed/https%3A%2F%2Fscholar.google.com%2Fcitations%3Fuser%3DgA_qrcUAAAAJ%26hl%3Den%26oi%3Dao) 为您的 google 学者帐户生成嵌入式代码。然后使用“高级 iframe 插件”将生成的代码包含到您的站点中。或者,使用 HTML 小部件将这些生成的 HTML 代码添加到您的 WordPress 网站。

【讨论】:

    猜你喜欢
    • 2018-06-09
    • 2022-01-02
    • 2014-04-05
    • 2017-04-17
    • 1970-01-01
    • 2023-03-24
    • 1970-01-01
    • 2017-11-18
    • 2012-06-18
    相关资源
    最近更新 更多