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

I have a page with tabs like this:

http://www.problemio.com/problems/problem.php?problem_id=180

See how there are 3 tabs? Only the content from one of them shows up when the user lands on the page, and the content from the other two shows up only when the user clicks on the tabs.

And the change happens using jQuery and JavaScript. But all the text is loaded when the page loads.

What I am wondering is whether this will hurt my SEO and make it harder for Google to index the complete pages?

share|improve this question
    
possible duplicate of Are temporarily hidden elements bad for search-engine rankings? or also this one –  Su' Oct 20 '11 at 16:38
    
@Su' The difference between this and the first question is that in this question the text is displayed in the HTML and hidden in the javascript, and in the other it's hidden with CSS. The second question could be a duplicate but isn't well written. –  paulmorriss Oct 21 '11 at 8:07
    
@paulmorriss Point taken, but the method(JS/CSS) isn't ultimately important as far as I can see. The HTML is always in the source. So I figure the first could serve as a generalized version of the question that covers both, possibly with a little adjustment. If the tabs pulled content via Ajax, I could see that as a separate situation, though. Either way, they could be useful for cross-reference if there aren't other supporting votes. –  Su' Oct 21 '11 at 8:21
    
@Su' Search engines can spot text hidden by CSS though and penalise if for trying to "cheat". –  paulmorriss Oct 24 '11 at 7:00

3 Answers 3

up vote 5 down vote accepted

This is fine. Since the content is available on the page when the page loads all search engines bots can find and index that content.

FYI, if you are going to also make that content available without JavaScript, which is good accessibility, make sure you use canonical URLs so you don't have duplicate content issues since multiple URLs will load the same content.

share|improve this answer
    
Yep, for search engines this particular one is fine, since the content is all on the same page (you can use "view source" to confirm). However, it can be confusing to users, if they're looking for something hidden in a tab and land on that page - they won't see what they were searching for and might assume that your site doesn't have that. –  John Mueller Oct 23 '11 at 8:30

Search engines don't generally run javascript when they crawl a page, so they will see the full text when they load the page. (Google is experimenting with running some javascript, but we don't know much about that.)

share|improve this answer
1  
Google has a crawlable ajax "standard" that allows them to crawl dynamically generated content. But it doesn't work with other search engines, the content isn't available to users with JavaScript turned off, and is generally considered a bad idea. –  John Conde Oct 20 '11 at 16:39

Yes it will probably hurt your SEO, if you are only using javascript to structure your site's content.

Edit: the javascript wont hurt your SEO, but you have to be carefull not to neglect the proper use of HTML for structuring your website.

To get a good idea of what search engines are indexing I always turn off CSS and javascript and see what I end up with. If the page is still structured and uses proper HTML tags for structuring and dividing I know i'm good.

However, search engines are always finding new and better ways to index your pages and rank the content. I wouldn't be suprised, like paulmorriss pointed out, that they are looking into interacting with javascript to see if there is more content to index. This holds especially for sites that use asynchronous javascript (ajax) to load external content into the page.

share|improve this answer
1  
If you check out the page they posted as an example, or just read the question, you'll see the content isn't loaded by JavaScript. It's already there when the pages is loaded. JS just changes what content you see. –  John Conde Oct 21 '11 at 11:46
    
That's exactly what i'm refering to when I say that "javascript is only used to structure the content" that is already loaded. I'm warning the op of the risk of using javascript to order the content and having no eye for a proper HTML structure. –  Luuk Barten Oct 21 '11 at 13:37
    
It's a good tip to turn off JavaScript and CSS, to see what the content of the page is. As for hurting SEO, your edit is surely the better answer. –  martinstoeckli Oct 21 '11 at 16:17

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.