title: Caching and gzip compression by htaccess
body: <p>Can someone provide me with an optimized .htaccess configuration that handles compression, browser caching, proxy caching, etc. for a typical website?</p>
  
  <p>Aside from my visitors, I'm also trying to make Google PageSpeed happy.
  I wanna use caching and gzip compression through .htaccess please help me with its code!</p>
  
  <p>I want to cache <code>icon,pdf,flv,jpg,png,gif,js,css,swf</code> files for long time</p>
  
  <p>I want to cache <code>xml,txt</code> files for 2 Days</p>
  
  <p>I want to cache <code>html</code> files for 2 Days</p>
  
  <p>And I wanna compress my <code>html,txt,css,js,php</code> files because those have large file size.</p>
  
  <p>Is there any way to gzip images using .htaccess?</p>