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

Although I'm aware of the various methods to show content only to users of a specific IE version, I was wondering if using conditional comments would have an effect on the way my site is indexed. If I choose to use conditional comments, I don't want to see something like this in Google search results:

enter image description here

Is this a possibility?

Please note that the above is merely an example. Another example could be marking up an entire section of the page targeted at Internet Explorer:

<!--[if IE 6]>
<div>
    <h3>IE6 Instructions</h3>
    <p>To save the foobar, right click the link and select "Save as..."</p>
    <p>More content for IE6...</p>
</div>
<![endif]-->

Could this on its own ever return a result for the phrase "foobar", i.e. would this content be indexed by any relevant crawlers?

Is content inside IE conditional comments indexed by any search engines?

share|improve this question
    
Is that content an actual example? –  John Conde Dec 27 '11 at 12:46
    
@JohnConde: No it's not a real example. It could be, but theoretically it could be anything, like instructions on how to perform some task in IE. What's the difference? I'll admit that I'm asking mostly for curiosity's sake, and simply to know the answer. If there's something about the content itself that has an effect on indexing, I'd love to know about it. –  Wesley Murch Dec 27 '11 at 12:49
    
@JohnConde: I think I see what you meant by "actual example". The screen shot is not real - I made it (note the fake URL and bogus page title). What I said was "I don't want to see something like this", meaning it hasn't happened. What I meant was the text in the screen shot is an "actual example" of some content that might appear in a CC on a real website. I think we simply have a communication issue. –  Wesley Murch Dec 30 '11 at 18:47

2 Answers 2

IE conditional comments are just a special kind of HTML comments. It is accepted that search engines do not index or give any weight to content in HTML comments. From a StackOverflow answer where they give a quote from Matt Cutts:

I believe that we have the ability to index them, but we usually don't index comments.

share|improve this answer
    
This was my suspicion, as CCs are merely comments after all. I wonder what the "usually" in the quote means, and if it applies to this case or not. Why did you ask me if the example content was real or not, does that have any bearing? –  Wesley Murch Dec 27 '11 at 13:32
    
I asked because if it was it would definitely answer your question making it a low quality question. But it didn't so your question was a high quality question. We like high quality questions. :) –  John Conde Dec 27 '11 at 14:22
    
Then can you tell me why the example being real one would make the question so easily answerable, and what the answer would have been in that case? Please keep in mind that I did not originally tag the question "seo", as it is not necessarily a question about optimization or improving search ranking. I'd like to know if even the last page of results could come up with content from the conditional comments. –  Wesley Murch Dec 27 '11 at 14:48
    
Do you think this is more appropriate for Stack Overflow? That's where I normally lurk but I was certain it would be migrated here. Sounds like the answer may very well be: "Comments are comments even if they are IE conditional comments, and comments don't get indexed", although one answer suggests that they might be. Maybe it's just a moot point because it's so extremely rare that one would do this, but I found it to be an interesting topic and couldn't find anything conclusive that specifically addressed the IE comments. –  Wesley Murch Dec 27 '11 at 15:24

You can choose whether to hide your IE-only content within HTML comments (downlevel-hidden), or within Microsoft proprietary tags (downlevel-revealed). The difference is that using the comment form hides the content from all other browsers (and Googlebot is, after all, just a type of browser) while the tags get ignored but their content rendered.

Microsoft has a description of the two formats:

http://msdn.microsoft.com/en-us/library/ms537512(v=vs.85).aspx

share|improve this answer

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.