SEO Superstitions: Are <script> Tags Really?

We have an SEO team in my office, and one of their sayings is that they have many <script> blocks embedded in HTML that are apocalyptically bad. As a developer, it makes no sense to me at all. Of course, Google’s search engineers, who are the smartest people on the planet, know how to skip such blocks?

My intuitive instinct is that minimizing script blocks is a superstition that has been going on since the early years of search engine optimization, and that in the modern world it means nothing. Does anyone know about this?


for each of our SEO gurus, script blocks (especially those that are in a line or occur before the actual content) are very, very bad, and make google bots refuse to process your actual content. It seems to me that bull, but I would like to see what others say.

+6
seo
source share
9 answers

It has been a period since I played the game with google tea leaves, but there are several reasons why your SEO expert can say this.

  • Three or four years ago, it was a little common idea that search engine algorithms would bring more weight to search words that were previously on the page. If everyone else was equal on pages A and B, if Page A mentions widgets earlier in the HTML file than Page B, Page Wins. It’s not that Google engineers and PhD staff couldn’t miss the blocks, and found that they found a valuable metric in their presence. With this in mind, it’s easy to understand that as soon as something is ā€œneededā€ (see No. 2 below) to be at the head of a document, an obsessed SEO person would like that.

  • SEO people who do not offer quick fixes tend to be supporters of a well-designed, validating / appropriate HTML / XHTML structure. Inline Javascript, especially those who don’t know, don’t know how these people do it (I am alone). Script tag addiction can also be related to some of Yahoo's work and others that have been done in optimizing Ajax applications (don't make the browser parsing Javascript until this happens). Not necessarily directly related to SEO, but it is best to use the white hat SEO type.

  • It is also possible that you misunderstand each other. Content created by Javascript is considered controversial in the SEO world. It’s not that Google cannot ā€œseeā€ this content, it’s that people are not sure how its presence will rate the page, as many games with a black hat SEO revolve around hiding and displaying content using Javascript.

SEO is at best Kremlinology and, at worst, a field that black hats won a long time ago. My free free tip is to stay away from the SEO game, provide my managers with estimates of how long, how long it will take to implement their SEO-related changes, and leave that to that.

+15
source share

There are several reasons to avoid inline / inline Javascript:

  • HTML is for structure , not for behavior or style. For the same reason, you should not put CSS directly in HTML elements, you should not put JS.
  • If your client does not support JS, you just pushed a lot of garbage. Spent bandwidth.
  • External JS files are cached. This saves some bandwidth.
  • You will have descentralized javascript. This leads to code repetition and all known issues that come with it.
+4
source share

I don’t know about the SEO aspect of this (because I can never say that mambo jumbo is from a real deal). But, as Douglas Crockford pointed out in one of his webcasts, the browser always stops parsing the script on each element. Therefore, if possible, I would prefer to deliver the entire document and enlarge the page using scripts as late as possible. Something like

  <head>
     --stylesheets--
 </head>
 <body>
   Lorem ipsum dolor
   ...
   ...
   <script src = "theFancyStuff.js"> </script>
 </body> 
+3
source share

I read in several places that Google spiders index only the first 100 KB of a page. 20 KB of JS at the top of the page would mean 20 KB of content later that Google won’t see, etc.

Remember, I have no idea if this fact is true, but when it is combined with other superstitions / rumors / outright quackery that you find in the dark underbelly of SEO forums, it starts to create a strange kind of feeling.

This is in addition to the fact that inline JS is Bad Thing regarding the separation of presentation, content and behavior, as indicated in other answers.

+1
source share

Your SEO guru is a little uneasy, but I understand the concern. This has nothing to do with whether the practice is correct or not or not a certain number of script tags, poorly viewed by Google, but everything related to the weight of the page. Google stops caching after (I think) 150KB. The more built-in scripts your page contains, the more likely it is that important content will not be indexed, because these scripts have added too much weight.

+1
source share

I spent some time on search engines (not Google), but I never did much in terms of SEO.

In any case, here are some factors that Google could reasonably use to punish a page that should be enlarged by including large blocks of inline javascript.

  • The total page size.
  • Page load time (combination of page size and download speed).
  • As search queries were found at an early stage of the page (it may ignore script tags, but this is a lot more processing).

Script tags with lots of built-in javascript can be interpreted as bad in themselves. If users often upload a large number of pages to a site, they will find it much faster if the script is in the same file.

0
source share

I would agree with all the other comments, but would add that when the page has more than just <p> around the content in which you believe in Google, interpreting the premium is correct, and this is always dangerous. Content is king, and if Google can't read the content at all, it's just another reason why Google doesn't show you love.

0
source share

Many SEO activities are not recommended by the search engine. You can use the <script> , but not excessively. Even the Google Analytics code snippet code in the <script> .

0
source share

This is an old question, but still very relevant!

In my experience, script tags are bad if they make your site load slowly. Website speed does affect your appearance in SERP, but script tags alone are not necessarily harmful to SEO.

0
source share

All Articles