performanceyslow

How to improve YSlow site performance grade for "Avoid CSS expressions"


I am checking the grade on Yslow. It returns me

**"Grade B on Avoid CSS expressions"**

There are a total of 2 expressions

   http://192.168.41.66/espritKM/esprit/public/CSS/fancybox/jquery.fancybox-1.3.4.css

How can i improve it?


Solution

  • Google is your friend:

    Avoid CSS Expressions

    One way to reduce the number of times your CSS expression is evaluated is to use one-time expressions, where the first time the expression is evaluated it sets the style property to an explicit value, which replaces the CSS expression. If the style property must be set dynamically throughout the life of the page, using event handlers instead of CSS expressions is an alternative approach. If you must use CSS expressions, remember that they may be evaluated thousands of times and could affect the performance of your page.