title: How does JavaScript memory work in browsers?
body: <p>When building advanced JS-interfaces and games I've found that I have to dig deeper in to how browsers handles memory for JS. My experience with memory and JavaScript is that the memory gets glogged (and makes animations and calculation slow/lagging ) when:</p>
  
  <ul>
  <li>There is alot of JS-generated content
  on the page </li>
  <li>There is alot of graphics
  (img-elements) on the page?</li>
  </ul>
  
  <p>I have therefore concluded that if I want to keep my memory fresh I should include as much HTML code as possible from the beginning of the document as it will be cached and not kept in memory. And off course remove all currently not used elements.</p>
  
  <p>Does anyone have any more info on this? Resources? Links?</p>