Hi i wanted to clear cache in my iframe, but still the old content still there and the account still connect and not the new one.
Can anyone help me? Thank you
This is the code:
<head>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
</head>
<div>
<iframe id="partner-browser-iframe" style="display: block; overflow: hidden; background: #0000; border: none"
width="1000" height="1000" src="url" frameborder="0"></iframe>
</div>
<script>
var myFrame = document.querySelector('iframe');
var myButton = document.querySelector('button');
myButton.onclick = function (evt) {
myFrame.contentWindow.location.reload(true);
}
</script>
Simple JS way. Reloads Pages without cache.
<body>
<button onclick=location.reload('true')>Reload once</button>
</body>
PS: First you can try to run location.reload(true) in your browser's console.