javascript - 如何缓存另一个站点的 iframe?

标签 javascript php jquery caching iframe

我的网站从另一个网站加载 iframe。我想缓存此 iframe 并加载缓存副本。

不幸的是我不能使用 nginx,这就是为什么我对如何使用 php/js/ajax/xml 或其他东西缓存 iframe 感兴趣。

也许是这样的:

 - create iframe.php file on server with loading another site iframe
 - iframe.php load iframe first time, than cache it
 - include iframe.php where I need (but I don't 
understand how to save all native header information of another site) 

所有这些我都需要从另一个网站加载 header 信息,但我不能多次执行,并且需要加载一次而不是向新用户显示缓存。

感谢您的帮助!

最佳答案

在客户端,您无法影响第三方页面导航器的缓存行为。

如果要在服务器端缓存页面,服务器端脚本必须获取页面并缓存它。您的 iframe 必须加载此脚本。

我希望我回答了你的问题。不幸的是我不太清楚。

关于javascript - 如何缓存另一个站点的 iframe?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33543595/

相关文章:

php - 使用 session 变量的 CodeIgniter 表单验证

javascript - AJAX 动态重新加载网页

javascript - 如何通过 mysql 数据选中/取消选中模式中的单选按钮?

javascript - 在 Colorbox 中执行 JS(或其他 jQuery 插件)?

javascript - 悬停在一个 div 上

带有延迟的javascript循环标签

javascript - Node Express 和 csurf - 403(禁止)无效的 csrf token

javascript - jQuery 对象索引忽略 jQuery.filter()

javascript - 无法从 jqgrid 中删除行

javascript - 获取td文本jquery过滤后tr的索引