Refresh iFrame (Cache Issue)

后端 未结 5 1027
南旧
南旧 2020-12-08 16:01

We are getting a weird issue on which we are not sure what exactly cause it. Let me elaborate the issue. Suppose, we have two different html pages a.html and b.html. And a l

5条回答
  •  情歌与酒
    2020-12-08 16:07

    For one possible solution to this, pass a "cache parameter" to your calls to a.html and b.html. For example

    HTML

    
    

    Javascript

    function cacheSafeReload(urlBase) {
        var cacheParamValue = (new Date()).getTime();
        var url = urlBase + "?cache=" + cacheParamValue;
        reloadFrame(document.getElementById('myFrame'), url);
    }
    

提交回复
热议问题