title: CSS expressions vs Filters and Javascript for internet explorer
body: <p>What is the difference between CSS expressions and CSS Filters?</p>
  
  <p>Are both bad for page speed?</p>
  
  <p>If something can be achieved in pure CSS in other browsers but for IE only possible by CSS expressions or CSS Filters or Javascript. Then should we always go for Javascript, if we are concerning the page speed.</p>
  
  <p>Will Javascript be quicker in rendering than CSS <code>Filter</code> or <code>Expression</code> solution?</p>
  
  <hr>
  
  <p><strong>Update after Pekka's answer</strong></p>
  
  <p>OK so CSS expressions should be avoided, it's clear.</p>
  
  <p>Now I want to know about Filters</p>
  
  <p>Example of filters </p>
  
  <pre><code>#myElement {
      opacity: .4; /* other browsers */
      filter: progid:DXImageTransform.Microsoft.Alpha(opacity=40); /* this works in IE6, IE7, and IE8 */
      -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=40)"; /* this works in IE8 only */
  }
  </code></pre>
  
  <p>To get PNG Transparency in IE6 and some CSS 3 effect in IE 6,7,8 We can use CSS IE <code>Filters</code></p>
  
  <p><a href="http://www.smashingmagazine.com/2010/04/28/css3-solutions-for-internet-explorer/" rel="nofollow">http://www.smashingmagazine.com/2010/04/28/css3-solutions-for-internet-explorer/</a></p>
  
  <p>and there are also some Javascript alternative available.</p>
  
  <p>Will Javascript be quicker in rendering than CSS Filter ?</p>
  
  <p><strong>Note:</strong> The <code>filter</code> property is not valid CSS</p>