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
-
Is it okay to leave off H1 tags?
I know that SEO uses H1 and H2 mainly and there should only be one H1 and there can be multiple H2 tags. But the site I’m reviewing generally has no H1 on a page and multiple H2 tags. The Page Title reflects the title of the page, so maybe this is okay as is? They have the styling down just so, so I don’t want to make them change it if it’s okay.
On-Page Optimization | | amybethmegjo0 -
Using Hidden Text Behind the Logo as H1 is good seo practice?
Hello Experts, For my website if I use use logo as h1 for homepage but that logo will not be actually h1 but hidden text ( text is my brand name or website name) behind will be h1 so it is okay to use in this way? Using hidden text as H1 is fine as per google? Thanks!
On-Page Optimization | | pragnesh96390 -
Use of trademarks in tags and text
Does Google spider read registered trademarks (the 'R' or 'TM') or do these marks impede anything if they are featured in meta tags or text?
On-Page Optimization | | KnutDSvendsen0 -
Impact of multiple links on the same page to the same url (different anchor text) ?
Hi, On our category pages, for every product we have several links pointing to the product : on the image, on the product name, on the short description, on "read more", and a javascript onclick on the entire div. Could this have a negative impact for link juice distribution, or is it counted as only 1 link with the first anchor text found on the page ? Thanks,
On-Page Optimization | | Strelok0 -
Can I use the same text in my meta description as I put in my post excerpt?
Hi, I'm just trying to understand the right way to optimise my blog posts and this is likely a dumb question... but to what extent should the text in my meta description differ from the text in my post excerpts? cheers, Andrew
On-Page Optimization | | seowhiskey0 -
Can't find Text-Only Cached version in Google search
Hi, I'm trying to view the text-only of a webpage to run a SEO audit, however Google does not give me this option. When i click the two arrows that appear to the right of a search result, the only option I get is Cached. Is there a reason this might be happening? I've tried clearing my cookies, signing out of Google, and anything else I could find on my troll of the internet. I also tried text, only please! however whether this works or not is debatable considering it shows me actual pictures on the site. Any ideas, or maybe another add-on that will work?
On-Page Optimization | | JuiceBoxOM0 -
Anchor text on outbound links on a blog, relevancy detrimental or positive?
We have a blog related to computer support, and we have been using guest posts and promotion of those posts to boost freshness and rankings of the blog. We have been restricting outbound links to prevent words such as 'computer repair, 'computer support' etc, because we were under the impression that if we want to rank for those words, we should only allow INCOMING links with that anchor text, and that outbound links from the page, would rob the other parts of the site of the link juice this page provides. My question is, is this wrong? Should I freely allow outbound links on my blog page that contain anchor text that I my self am trying to rank for? Or was I correct initially? Current the anchor text is in 'related' industries, such as mobile apps, technology news, etc...things that google might think are 'related', but not exactly what the site is about.
On-Page Optimization | | ilyaelbert0 -
Are Content in Inline Javascript and Collapsible Considered Cloaking to Google?
Hi, I would like to save space in my website and do not want my other products to be pushed down below the first fold. In order to do that, I have decided to add content inside inline javascript or using collapsible. For collapsible, I may be using "show/hide" button or "read more" button to show the whole content. So does content in Javascript and collapsible considered hiding from Google? If it is, then I have to think of other options. Thanks.
On-Page Optimization | | globalsources.com0