简体   繁体   English

如何从 iframe 中清除缓存?

[英]How to clear cache from an iframe?

I am interrogated a platform with another platform in an iframe .我在iframe中用另一个平台询问了一个平台。 But problem is that i logout from the parent window then the iframe take chache.但问题是我从父窗口注销然后iframe采取 chache。

<iframe scrolling="no" 
        id="chat_container" 
        src="<?php echo $this->meetingUrl; ?>" 
        allow="camera; microphone">
</iframe>

Solution 1:解决方案1:

You can add the randomly string end of your iframe url.您可以添加 iframe url 的随机字符串结尾。

<iframe scrolling="no" 
    id="chat_container" 
    src="<?php echo $this->meetingUrl; ?>?v=xkjsdkjhasdk" 
    allow="camera; microphone">
</iframe>

Solution 2:解决方案2:

Please try to add the html meta tag on your head of the page.请尝试在页面头部添加 html 元标记。

<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM