ok so i have two iframes, one iframe has a auto refresher one doesn't, the one with a auto refresher would get the newest updates to the file and i want js to match them against each other and execute if there has been a change, they both have the same src please help me the code is below
<iframe src="messages.txt" height="100%" width="100%" id="frame"></iframe>
<iframe src="messages.txt" height="100%" width="100%" id="frame1"></iframe>
<p>
<script>
var iframeContent = getElementById('frame1').contentDocument;
setInterval(function () {
var iframeContent1 = getElementById("frame").contentDocument;
if(iframeContent1 !== iframeContent) {
window.location.href= './';
}
}, 1000);
</script>