Okay to have text in javascript?
-
There are so many conflicting opinions out there, one of which I recently read indicated that if you are putting your keywords in javascript, the new google update would have an issue with this.
If you want to keep a page clean looking and have visitors click to read more text, is the opinion here that this is okay or an issue? The main purpose of adding text in javascript would be to have enough content on the page without making it look cluttered.
Webmaster tools says that when you have hidden text in javascript, the same content should be placed in a no script tag?
Thanks.
-
The client wants to remove existing content to create a cleaner look on the page. I suggested we find a way to keep that content to avoid losing the traffic it generates and turning the page into a low quality page. My thought was to display a portion of the content and have the visitor click to view the rest.
-
What I've found is that it is okay to have text in JavaScript and Google/Bing will probably index that content if the JavaScript is not too complex. I've seen it not index more intense JavaScript or scripts that require user interaction. You can put alternative text in noscript tags and that seems to work okay.
Typically though, I recommend putting the super important optimized text in regular old HTML instead of JavaScript. That way you are 100% certain that Google/Bing can crawl and index that content. Plus, it is typically easier to manage content in HTML.
However, what you said about the clutter makes it sound like your JavaScript is adding effects to text already in the HTML. Is that the case? For example, you have a div on your page that contains some text. By default, it has the style attribute "display:none;". When a user clicks or takes some action, you change that display attribute to shows previously hidden text. Is that what you are doing?
If that is what you are doing, or something like that, then you have text in HTML not JavaScript. One easy way to check this is to disable CSS and JavaScript then load your page. You want to make sure you can see the content you want Google/Bing to index.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Javascript(0) extension causing an excess of 404's
For some reason I am getting a duplicate version of my urls with /javascript(0) at the end. These are creating an abundance of 404 errors. I know I am not supposed to block JS files so what is the best way to block these? Ex: http://www.jasonfox.me/infographics/page/8/javascript(0) is a 404 http://www.jasonfox.me/infographics/page/8/ is not Thank you.
On-Page Optimization | | jasonfox.me0 -
Can "window.location" javascript on homepage affect seo?
Hi! I need to add a splashpage to my wordpress site. I use "window.location" javascript on the homepage to redirect on the splashpage (controlled by cookie to redirect only for the first access). Can this technique affect the SEO on homepage? Thanks in advance!
On-Page Optimization | | StudioCiteroni0 -
Text in collapsed section
Does anyone have any quantifiable evidence regarding text that is collapsed - when clicked the section expands and presents the text, against just having the text on view in the page. That is, instead of having a FAQ with question followed by answer, there is a question which you click to expose/expand the answer. Could the collapsed text be potentially detrimental to ranking?
On-Page Optimization | | MickEdwards0 -
Table text : Does that influences the website's ranking ?
We are currently working on a new page for one of our clients and there is A LOT of writing, so A LOT of differents pages. If I decide to put the texts on table text instead of creating a link for another page, will that influence the ranking in any way ? I've been a web writer for only a year now and still try to figure out how to optimize the written part. Thank you for your answers.
On-Page Optimization | | marketingmedia.ca0 -
Can bad text URLs hurt pages?
If you have some pages that contain plain text URLs (not anchored links) that used to be good URLs, but are now bad, either because the website shut down or because it has been acquired by someone else and is now parked (or worse) - are those URLs enough to cause quality problems? For example: This information was brought to you by Waymaker http://www.waymaker.net These aren't the only ones. And yes, I know I should fix them, but there are probably 10,000 pages like it. I will fix them, but its not something I can do in a few minutes. (this one is easy to fix programmatically, but others are a lot more complex) So my question is: do you have actual experience that these are bad enough to cause ranking problems (making them low quality)
On-Page Optimization | | loopyal0 -
Anchor text landing page
do you think google counts the H1 of the landing page from an anchor text, for example if the anchor text of my product is . blue sexy X, do you think its good if the h1 of the landing page says the exact same thing
On-Page Optimization | | Dirty0 -
Should I put a No follow on each link in a Javascript dropdown menu?
I have a javascript dropdown menu on every page of my site. It lists all the wineries I write about and sell. About 300 links. I've been told that google doesn't like so many links on a page, but that it doesn't spider javascrpt. Then I hear that it does. Am I being penalized by all the links? Or does the spider really not see them? I don't want to give up my javascript menus, unless I have to. Should I put a no follow on each link inside the code? And on the other hand, am I losing google juice by not letting it see all the pages on my site that I link to in the javascript menu? Thanks in advance for your help!
On-Page Optimization | | JeanYates0 -
Lots of links on homepage to internal pages with keyword rich anchor text - problem?
Hi, All! We have a new potential client, that when looking at his site with a tool, we noticed that the previous SEO company they worked with filled the homepage copy with lots of keyword-rich anchor text links pointing to different pages on the site - many links going to the same page, just with different keywords. These links are not indistinguishable in format from the other text, which is why we only noticed it with a tool. I certainly wouldn't recommend doing that to start with, but once all these links are there, would you recommend taking them down? Is there any conceivable chance it could help the site? Is there a significant reason to think it will harm the site? Or will it just be pretty neutral? In all that's been written (much by SEOMoz) about only the first link's anchor text counting, do subsequent links work like a no-follow in the sense that they are a waste of the link-juice of the page, or is it as if they aren't there at all? (And is "only the first link counts" still the most widely held theory, or have there been new developments since?) Thanks, All!
On-Page Optimization | | debi_zyx0