我的网站从另一个网站加载 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/