title: Loading a JSON file via a script tag
body: <p>I've written a small I18n plugin that accepts different languages via json. To make usage as simple as possible for the user, I want them to be able to just plop their json package directly in a page's  along with the actual script:</p>
  
  <pre><code>&lt;script id="pop-language_es" type="application/json" src='languages/es.json'&gt;&lt;/script&gt;
  &lt;script src='pop.js'&gt;&lt;/script&gt;
  </code></pre>
  
  <p>To keep this plugin as lean as possible, I want to avoid external dependencies like Jquery. I can retrieve the script tag using pure js:</p>
  
  <pre><code>var json = document.getElementById("pop-language_es");
  </code></pre>
  
  <p>The problem is, this is only the tag, not the actual json. Is there a way to retrieve the contents with something like <code>json.content</code>?</p>
  
  <p>There's a similar question <a href="https://stackoverflow.com/questions/148441/how-can-i-get-the-content-of-the-file-specified-as-the-src-of-a-script-tag">here</a>, in which several people recommend using Ajax. That would definitely work in this situation, but wouldn't that result in the client downloading the json twice? (First during the page load, then again during the Ajax call.) If so, I'd hope there's a better option, as these json files can get quite large.</p>