title: JavaScript version control: Managing versions from FE
body: <p><strong>SCENARIO</strong>: </p>
  
  <p>I am trying to come up with a way to Version Control in JS that fulfills two premises:</p>
  
  <ol>
  <li>Cache-wise</li>
  <li>Few (or none ideally) calls to Backend</li>
  </ol>
  
  <p>Therefore I came up with this scheme:</p>
  
  <p>I need FE to reload contents everytime a new version is available, so a simple way to achieve this would be to add a version tag to src link:</p>
  
  <pre><code>&lt;script type="text/javascript" src="myfile.js?15.6.0"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I can add some templating, so the version number can be defined elsewhere, like:</p>
  
  <pre><code>&lt;script type="text/javascript" src="myfile.js?$$RELEASE_ID$$"&gt;&lt;/script&gt; 
  </code></pre>
  
  <p><strong>PROBLEM</strong>: </p>
  
  <p>I would need to call the Backend, to know the latest version (and the Backend will read it from <code>pom.xml</code> file, returning it afterwards)</p>
  
  <p><strong>QUESTION</strong>: </p>
  
  <p>Is there any way I can use so the Front End knows what is the latest version?</p>
  
  <p>Thanks.</p>