SEO friendly conditional loading using javascript

I plan to make responsive + mobile first web design. So here is my plan:

  • Creation of the first mobile site.
  • Using Javascript to load the desktop or large screen HTML

However, I have a problem. As far as I know, the HTML content that I will load using javascript will not be readable by search engines? I searched a lot on the Internet, but I could not find a reasonable answer to this problem.

Can someone tell me if it is possible to make SEO friendly conditional loading using Javascript? Or do I need to look at the server language ie PHP / ASP to download content using device discovery?

+4
source share
2 answers

Read about Hashbangs, which allow you to dynamically upload content to web pages.

I will not comment on whether to use the server side, Javascript or just a responsive design, as you specifically mentioned Javascript.

From google

This document describes an agreement between web servers and search engines that allows dynamically generated content to be visible to crawlers. Google currently supports this agreement. We hope that other search engines will also accept this offer.

+1
source

If the content for mobile and desktop sites is the same and you just format it differently for each screen, then this should include CSS, Media Queries, and a bit of JS for backward compatibility. This method should not harm your SEO.

Here is a good tutorial: http://www.html5rocks.com/en/mobile/responsivedesign/

This is hiding the content on the page's bootstrap (so you show it later through JS or you pull it through AJAX), which is not suitable for SEO.

To have AJAX content for Google Crawl, you need to follow these steps: http://developers.google.com/webmasters/ajax-crawling

Here's a nice google blog post on responsive design: http://googlewebmastercentral.blogspot.com/2012/06/recommendations-for-building-smartphone.html

+4
source

Source: https://habr.com/ru/post/1440427/


All Articles