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 wonder what is the best way to have Javascript loaded content indexed by search engines. I know that search engines don't execute Javascript, but I am thinking more of an progressive enchantment.

I am creating a responsive website, and on the home page I will have some sections about most visited products and recommended product that I plan to load depending on the device detected. These products will be in sliders with thumbnail images and names of the products. If mobile is detected slider content will not load, ant the link to the external page will be shown. I know that external content will be indexed via link to those resources.

Where will the users be directed from search in this case?
To the external page or home page?
Will it be bad for SEO if I show only product names on front page so they can be indexed and hide them with CSS?
What is the best way to index that content and possibly direct users from search to home page?

Also, i've seen the Ajax crawling but iI would like not to use that if there is any better way.

share|improve this question
add comment

1 Answer

search engines don't execute Javascript

This isn't strictly true anymore - they do execute some javascript, sometimes.

Where will the users be directed from search in this case?

They will be directed to the page with the content relevant to their search - i.e. the external page, in this case.

Will it be bad for SEO if I show only product names on front page so they can be indexed and hide them with CSS?

Yes. Showing one thing to visitors and something else to search engines is called 'cloaking' and frowned upon - search engines can and do de-list sites for this.

What is the best way to index that content and possibly direct users from search to home page?

You could just use a slider/carsousel that works fine at any resolution, like the bootstrap one: http://twitter.github.io/bootstrap/javascript.html#carousel - try re-sizing that window.

Speaking of which, be aware that 'device detection' isn't all that reliable or future proof - you're much better off just using viewport widths and serving appropriate content that way.

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.