1

I'm working on a website where a lot of the page content is generated by java script by getting JSON from the server. This JSON is used for writing the page content on the client side. Additionally, I am using JavaScript to write some of the page links on some pages, because it is really simple to generate the url for that text from text on the page. Are these techniques alright when it comes to search engines indexing my site? The links all remain internal to the site and it is not meant to be deceptive, just to save on bandwidth.

3
  • 2
    Have you tried Fetch as Google in Search Console (formerly Webmaster Tools)? If not, I suggest you do. This will help you to know the answer. (hopefully)
    – closetnoc
    Commented Aug 2, 2015 at 2:30
  • 1
    "content is generated by java script by getting JSON from the server" - on page load or as the result of a user action?
    – MrWhite
    Commented Aug 2, 2015 at 9:09
  • @w3d on page load and on certain actions like changing a select
    – HSchmale
    Commented Aug 2, 2015 at 14:44

1 Answer 1

2

I'm working on a website where a lot of the page content is generated by javascript by getting JSON from the server. .... Are these techniques alright when it comes to search engines indexing my site? ... just to save on bandwidth.

This is a bad idea.

What you're describing is that you have some basic HTML loaded and then a call to a special file on the server using AJAX technology that returns codes which help form the rest of your page. If the call is mandatory for much of the readable content to load, then you may end up creating a poor user experience because no one wants to wait a long time to see the content they are searching for.

As far as bandwidth is concerned, you're not really saving bandwidth. In fact, you're using more because your idea requires the client to make one request to the initial page containing the Javascript required to request another page from the same server. Two requests cost more bandwidth than one request.

If you want to stand a chance to be indexed in search engines with your idea, make sure the content is loaded before the Javascript code is run, that way, people with browsers that have no Javascript support and/or Javascript disabled can still see what the site is about.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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