The new PageSpeed 1.11 does not suggest anything for using efficient CSS selectors. Does that mean that it does not affect the speed of my site. In PageSpeed 1.9, I scored and F (0) for not using efficient CSS selectors. Then, my overall score was 89. Now, there is no rule for efficient CSS selection and I score 93. Can anyone explain why Google has removed the rule.
2 Answers
It's still there. It looks like that rule may only apply only under circumstances like a deep DOM. Sites with that have shallow DOMs may not have this rule apply to them. I've tried to find a site where this rule is applied but haven't found one yet so I can't say for sure when it is triggered or not. Hopefully someone out there can figure it out for us as it would be nice thing to know.
-
Could it be because I am not using anyking kind of fancy javascript effects, not even jquery. I my site's sources there is only one comment-reply.js and that too a very few lines.– SamCommented Jul 30, 2011 at 3:15
-
I don't think that javascript would affect this rule as it seems to be solely focused on CSS. But I'm not 100% sure about that.– John Conde ♦Commented Jul 30, 2011 at 12:18
-
1I'm sure I read somewhere that these rules can cause performance problems in Javascript. If a CSS rule is inefficient then adding elements to the DOM means slightly slower parsing every time, which can add up. However, I'm sure Page Speed doesn't parse all Javascript to check if this may happen. Commented Jul 30, 2011 at 15:02
If you want to check your css file for efficiency then I can recommend using csslint.net. However, do note, csslint takes things to extremes and you should read their comments on some of the errors/warnings carefully. I wouldn't agree with 100% of what they say.