Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Insert inner HTML by javascript (instead of full HTML) - disadvantages?

         

jetteroheller

4:28 pm on May 24, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



At the last part of each page is the index of the current chapter.

Just right now is in the html only

<span id=for_index></span>

later when the javascript is loaded, it sets the innerHTML of "for_index".

In the index of the current chapter are between 3 to 30 links to other pages in the same chapter.

1.) Does Google also index html inserted by javascript
2.) Is it better to have the index direct in the html of the page or inserted by javascript?

When somebody looks on 10 pages in the same chapter:

Load 10 pages with 6 kb average plus the index javascript with 5 kb makes 65 kb total.
All gun Zip compressed delivered

When the index is in the html, it would be 10 pages with 6+5 kb average makes 110 kb.
45 kb more than with the javascipt insert method.

seoskunk

9:34 pm on May 24, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I believe Google would see the content here an article that explains it in more depth

[googlewebmastercentral.blogspot.co.uk...]