Will google index content be declared in javascript inline variable?

I can not find a clear answer to this question. If my page looks like this:

<html>
<head>
  <script>
    var mypets = [ 
        { 'type': 'dog', 'name':'rover' }, 
        { 'type': 'cat', 'name':'kitty' }];
    $('#btnShowEm').click(function() { $('#emptyAtFirst').text(mypets[0].name); });
 </script>
</head>
<body>
  <div id='emptyAtFirst'></div>
  <button id='btnShowEm">ShowEm</button>
</body>
<html>

Will Google index mypets data even if it doesn't appear in html at the beginning? A real-world page announces a lot of content in a similar javascript object and displays it in response to user actions; I want to know if I need to do something to index the page based on all the content, and not just what is visible in html before javascript is launched.

+4
source share
1 answer

I do not recommend that you rely on content stored in JavaScript to boost your SEO efforts.

Google " , JavaScript, , , , DHTML Flash, , ". Google Lynx, , , .

Google JS, , ( ) JavaScript. HTML. , HTML5 . , , , , , HTML, , JavaScript .

.

+1

All Articles