title: Loading from a JSON configuration file into an HTML file?
body: <p>I'm a Javascript novice, so for all I know I want the impossible.</p>
  
  <p>I have a page that looks something like this:</p>
  
  <pre><code>&lt;html&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;script src="//static.foo.com/x/js/file1.js"&gt;&lt;/script&gt;
      &lt;script src="//static.foo.com/x/js/file2.js"&gt;&lt;/script&gt;
      ...
      &lt;script src="//static.foo.com/x/js/file10.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
      ...
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>As you can see I have many included files at the same static location.  It's possible that the HTML file might be used in a different way by someone else where they include the files from a different static location, so I'd like to introduce a <code>config.json</code> file where this and other things can be specified, e.g.:</p>
  
  <pre><code>{
    "streamingApiLocation": "//stream.something.com/",
    "staticAssetLocation": "//static.foo.com/x/", 
    "authApiLocation": "//auth.something.com/"
  }
  </code></pre>
  
  <p>Somehow this would be loaded into my page, and my script inclusions would be something like:</p>
  
  <pre><code>    &lt;script src="config.staticAssetLocation + js/file1.js"&gt;&lt;/script&gt;
      &lt;script src="config.staticAssetLocation + js/file2.js"&gt;&lt;/script&gt;
      ...
      &lt;script src="config.staticAssetLocation + js/file10.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>...this of course is not proper syntax... But basically I'm looking for a way to have variable information in <code>script</code> tags in the header, based on information provided in a JSON file. </p>
  
  <p>Is something like this even remotely possible?</p>