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
-
Does javascript generated content consider as regular content?
The website mentioned below, the content is generated using javascript, and content is something to do with Unicode char. The Unicode content creates as you scroll down. Will this content affect SEO https://www.myweirdtext.com/
On-Page Optimization | | teenmass423230 -
How much text is recommended for a homepage?
I'm working with a client who is redesigning their site and the new design is very image heavy. Does anyone have any recommendations on the minimum amount of text the homepage should have so that it will rank (or at least not be penalized)? It's a site created by a known brand, but the site itself and URL are relatively new. Katherine
On-Page Optimization | | KatherineWatierOng0 -
How many css and Javascript on ecommerce site?
Hello, I want any tool which seach css and javascript of whole ecommerce cite? Please suggest. Thanks! Dev
On-Page Optimization | | devdan0 -
Web Design - Text links better than drop down menus?
Hello So with reading a blog post by Bruce Clay - http://www.bruceclay.com/blog/seo-friendly-web-design/ It reads that it Is best for seo to use text links instead of drop down menus. So I just wanted to ask you opinion.
On-Page Optimization | | Berner0 -
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 -
Anchor Texts on Internal Links on my Site Question
[Hey folks, Anchor text question for internal links on my site. We all know that proper anchor text is important for rankings, both in links pointing to your site and links on your site. Google webmaster tools is showing my top internal anchor text links to be letters. This is because of navigation on the site which is in a global footer on hundreds of thousands of pages. Do you think that this dilutes or minimizes the relevance of the real anchor texts that we are targeting which trail behind these, or if this went away it would have no effect on the rest of the anchor texts on the site. How would you handle this, we can just get rid of this navigation because it's passing PR and helping the pages get spidered. Thanks in advance. Anchor text 1. g 2. q 3. d 4. v 5. k 6. t 7. o 8. u 9. a 10. p 11. m 12. r 13. e 14. x 15. y 16. l 17. i 18. z 19. c 20. j 21. s 22. b 23. f 24. h 25. w 26. n](mailto:acaldarea@hotmail.com)
On-Page Optimization | | irvingw0 -
On site optimization - anchor text in body text
Hi I am learning SEO from scratch and am only a couple of weeks in. My wife has just started a website selling children clothes. In the left bar there are links to the different producers. Clicking it takes you to the products from that producer. In the body text om the main page ( epleskrinet.no) the same producers are mentioned. By time i need to opitmize for all of these. Is there any point in making them anchor text - taking them to the same URL as is given in the side bar ? Or will it get discounted ? Dan Laerum
On-Page Optimization | | danlae0