Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

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.

share|improve this answer
    
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. –  Sam Jul 30 '11 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 Jul 30 '11 at 12:18
1  
I'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. –  DisgruntledGoat Jul 30 '11 at 15:02
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.