title: How to handle expired files without refreshing the browser when using Single Page Application (SPA)?
body: <p>I have done a full Single Page Application (SPA) application using Angularjs.</p>
  
  <p>So far so good.</p>
  
  <p>As anyone knows, all javascript files are loaded in the first time access. Or, some file are loaded in lazy mode style when needed.</p>
  
  <p>So far so good...</p>
  
  <p>The situation is: the server updates all files (html partials, javascripts, css's) and the client remain with a lot of files out-dated.</p>
  
  <p>This would be simply solved refreshing the browser, hit F5 key, control+f5, or refresh button in the browser. But this concept does not exists when working with SPA.</p>
  
  <p>I'm not sure how to solve this problem.</p>
  
  <p>I could detect somehow (doing a ping maybe) and just to re-load that specific file.  With document.write strategy. But now rises another problem, I have a single javascript file with all javascript minified.</p>
  
  <p>I could try to force a full reload in the browser or force to re-login (and reload because login are SPA part).</p>
  
  <p>But reloading is an ugly solution, imagine the client lose all data in the form because he was unlucky the server have just updated. And worse, I must now create some "auto-save" feature just because of this.</p>
  
  <p>I'm not sure how to handle this, if possible, doing in "angular way".</p>
  
  <p>I wonder how google gmail handles this because I stay logged for many many hours without logging of.</p>