title: How to conditionally stop loading a React app's scripts on unsupported browsers?
body: <p>So my project is using create-react-app, the <code>&lt;script/&gt;</code> with the React <code>main.js</code> is loaded at the bottom of <code>&lt;body/&gt;</code>. When it loads, it crashes on unsupported browsers.</p>
  
  <p>I have a block in a <code>&lt;script/&gt;</code> above the <code>main.js</code> one, it checks your browser and conditionally doesn't render <code>&lt;div id='roor'/&gt;</code>, but a call to action to go update your browser. When that call to action is displayed, I had a <code>window.stop()</code> at the end, so the browser doesn't load the react script. Unfortunately, the images also fail to low.</p>
  
  <p>Is there a way to stop loading the React js? Or maybe a way to preload the images in the ?</p>
  
  <p>Example structure:</p>
  
  <pre><code>&lt;body&gt;
    &lt;script&gt;
       Script 1 here, checking browser version and using `document.write()` if 
       unsupported
    &lt;/script&gt;
    &lt;script&gt;
      React script here, which shouldn't run/be imported if the above script 
      found an unsupported browser.
    &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>