'Delete cache in iframe (3rd party website)

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>

enter image description here



Solution 1:[1]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1