title: How do you cache an image in Javascript
body: <p>My friends and I are working on a website where we would like to cache certain images in order to display them faster in the future.  I have two main questions:</p>
  
  <ol>
  <li>How do you cache an image?</li>
  <li>How do you use an image once it has been cached? (and just to verify, if an image is cached on page A, it is possible to call it from the cache to use it on page B, right?)</li>
  </ol>
  
  <p>Also, is it possible to set <em>when</em> the cached version of the image will expire?</p>
  
  <p>It would be much appreciated if an example and/or a link to a page which describes this further was included.</p>
  
  <p>We're fine using either raw Javascript or the jQuery version.</p>