JSFiddle - React, Tailwind, and code Playground

by tchalvakspam

HTML

<body>
body initial text    

<meta http-equiv="Cache-control" content="no-cache, no-store">
<div id="replace-500" style="background:#ffcc66;padding:2em;font-size:1.3em;display:none;">
      <h1><a href="/">Shermanbrothers.com</a> - An Error has occurred with this page</h1>
    <p>
      We apologize for the inconvenience, but there was a problem with this page that prevents it from displaying fully.
     </p>
     <p>
         The error has been logged, and we will deal with the issue as soon as possible.
     </p>
    <p>
        In the meantime, you can:
    </p>
         <ol>
             <li>click "back" on your browser to try again</li>
             <li>Or follow this link to the main page of <a href="/">ShermanBrothers.com</a></li>
         </ol>
</div>
</body>

JavaScript

window.onload = function(){
    // Write out the error page body.
    var replacementBody = document.getElementById('replace-500');
    var newContent = replacementBody.cloneNode(true); // Clone with children.
    newContent.style.display = 'block';
    var body= document.getElementsByTagName('BODY')[0];
    body.appendChild(newConent); // Stick the html in.
             
    // Refresh the page periodically
    setTimeout(function(){
        location.reload(true); // Non-caching refresh.
    }, 120*1000); // Reload after 2 min delay
};