Does Javascript above the body tag impact SEO?
-
This post is deleted! -
I would probably clean it up. Take that javascript code, put it in a new .js file and load it externally.
-
I agree with Nicholos. Even though it probably won't hurt your rankings (perhaps a little in loading time or by placing your keywords further down the code), I would indeed put the code in a separate .js file. This way the users' browsers will cache the code as well, speeding up the website in the process.
-
This post is deleted! -
I agree with Nicholas and Theo. A website's code should be clean and efficient. With that said, I'll specifically answer the question and say that No, the javascript you described will not have any negative impact on SEO except as it pertains to page loading speed.
I would suggest using PageSpeed or a similar tool and track page loading efficiency. Trade with and without javascript enabled. If the difference is very small, then there is not any negative impact to SEO. If the difference is larger, then there COULD be an impact.