Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Google crawling javascript code and considering it duplicate? I have never heard of this problem before. Some of my pages have inlined javascript (if the content is small), that means the same <code>&lt;script&gt;...&lt;/script&gt;</code> on every page.</p> <p>There are also cases where I output javascript variables more-or-less the same way you do. Google never marked it as "duplicate content".</p> <p>Description from <a href="https://support.google.com/webmasters/answer/66359?hl=en" rel="nofollow">here</a>:</p> <blockquote> <p>Duplicate content generally refers to substantive blocks of content within or across domains that either completely match other content or are appreciably similar. Mostly, this is not deceptive in origin. Examples of non-malicious duplicate content could include:</p> <ul> <li>Discussion forums that can generate both regular and stripped-down pages targeted at mobile devices</li> <li>Store items shown or linked via multiple distinct URLs</li> <li>Printer-only versions of web pages</li> </ul> </blockquote> <p>You can get this kind of errors if you have the same content on more than one of your pages, but google does not parse javascript as content. (Although you can never know for sure what google does or does not). The same way that google will not mark your <code>&lt;head&gt;</code> tag as duplicate, or there is no penalty for having the same layout (menu, footer, etc) on every page.</p> <p>You can put that <code>&lt;script&gt;</code> tag in an <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/aside" rel="nofollow"><code>&lt;aside&gt;</code></a> tag just to be sure.</p> <blockquote> <p>The HTML Element represents a section of a page that consists of content that is tangentially related to the content around it, which could be considered separate from that content. Such sections are often represented as sidebars or as inserts. They often contain side explanations, like a glossary definition; more loosely related stuff, like advertisements; the biography of the author; or in web-applications, profile information or related blog links.</p> </blockquote> <p>This means that the content will be more or less ignored by google when indexing the page. It will not mark it as a duplicate since it could be a commertial.</p> <p>Also drop the <code>language="javascript"</code> attribute from your script tags. I doubt that it would confuse google in any way, since <a href="https://developer.mozilla.org/en/docs/Web/HTML/Element/script" rel="nofollow">that attribute is deprecated</a> (use <code>type</code> instead) and nothing takes it into account nowadays. But if google bot does, the correct value would be <code>text/javascript</code> instead of simply <code>javascript</code>. It is possible that google does not recognise the value <code>javascript</code> and parses it as unknown type of text content.</p> <p>The default type of the script is <code>text/javascript</code>, so it is <strong>safe</strong> to omit.</p> <hr> <p>Above all I suspect that the problem is not the existence of JS variables, but some other thing like GET parameters in your URL. GET parameters can be dealt with by configuring URL Parameters correctly in Webmaster Tools.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload