title: Tesseract.js - Not working first time
body: <p>I have a web page with a simple image <strong>OCR</strong> text.</p>
  
  <p><a href="https://i.stack.imgur.com/TknNA.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TknNA.gif" alt="enter image description here"></a></p>
  
  <p>I would like to get the text of this image with <strong>Tesseract.js</strong>. It's working fine except at first launch. The following message is displayed and nothing more:</p>
  
  <blockquote>
    <p>initializing api (100%)</p>
  </blockquote>
  
  <p>After reloading it's working fine. I don't know why it only work after reloading the page. If I clear the cache the issue reappears. I use Firefox. </p>
  
  <p><strong>My HTML/Javascript file</strong></p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;QRScanner Library Test&lt;/title&gt;
          &lt;script src="tesseract.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
      &lt;body&gt;
          &lt;input type="button" id="go_button" value="Run" /&gt;
          &lt;div id="ocr_results"&gt; &lt;/div&gt;
          &lt;div id="ocr_status"&gt; &lt;/div&gt;
          &lt;img id="img" src="ocr.gif"/&gt;
          &lt;script&gt;
            document.getElementById("go_button")
                  .addEventListener("click", function(e) {
                      var url = document.getElementById("img").src;
                      runOCR(url);
                  });
              function runOCR(url) {
                  Tesseract.recognize(url)
                       .then(function(result) {
                          document.getElementById("ocr_results")
                                  .innerText = result.text;
                       }).progress(function(result) {
                          document.getElementById("ocr_status")
                                  .innerText = result["status"] + " (" +
                                      (result["progress"] * 100) + "%)";
                      });
              }
          &lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I have downloaded in the same folder all js files: <code>tesseract.js</code>, <code>worker.js</code>, <code>index.js</code> and language package <code>eng.traineddata.gz</code></p>