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
-
OMG! does Google really consider text-decoration:none as a hidden link?
So I was reading this article today https://www.mattcutts.com/blog/hidden-links/ Can setting a link to the same color as regular text and applying text-decoration:none really be considered a 'hidden link'?
On-Page Optimization | | cbielich0 -
Removing text from Homepage - Bad idea?
Hi Mozzers, I've just read this great article: http://moz.com/ugc/how-to-build-a-great-online-fashion-brand-34-things-that-really-amazing-fashion-retailers-do I'm working with my wife on a small (hopefully, growing) fashion website www.vintageeheirloom.com One of the points was not to directly sell on the homepage, rather draw customers into different areas of the site. Seems good advice and it's followed by many big brands online. As a small company, doing fairly well for some targeted keywords, do you think it would be a good or bad idea for me to remove most, or all of the text on my homepage. The main emphasis of our site is vintage Chanel and using the tool nTopic I score 99% relevancy for 'Vintage Chanel'. Removing would certainly affect this. Obviously I could amend my Vintage Chanel shopping category to include all this. I'd be grateful if you have any thoughts / similar experience. Thanks ! Kevin
On-Page Optimization | | well-its-1-louder0 -
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 -
What font should i use for my text to make page better
Hi i have changed a page layout and first of all would like to know what people think, also i would like to know what font i should be using to make the page better. My website is www.in2town.co.uk any help would be great
On-Page Optimization | | ClaireH-1848860 -
What's the maximum length (number of spaces) for the Alt Image Text?
I'm setting up alt image text for the images on our website and I'm wondering if there is a maximum number of spaces that should be used that field.
On-Page Optimization | | JillCS0 -
Keyword text block on homepage - keep or do away with?
One of my sites is getting a major refresh on the home page, which is good and bad. The legacy homepage was very long, and had a lot of text (thousands+ of words) in the body, with about 450+ links (internal/external) on the page. A ton of graphics, etc etc. Yuck. The revamped homepage is much improved. Very short, visual, fast, and SEO optimized. It's more of launching pad into the rest of the site. But, the text in the body is much less, perhaps a 100 words or so. The worry is that with so little text, matching the target kw count will appear as stuffing. The 'solution' was to include a visible text box at the bottom of the page, with about 300 words, basically what would typically appear in an 'about' section of a site. But instead, its located on the bottom of the homepage to beef up the pages content, and to avoid looking too 'stuffed'. Visually, its unattractive IMHO and while the text is good and informative, its under the fold and will likely not change that much going forward. This all seems very 10 years ago to me, but I'd like a second opinion. Is this box of text a good strategy?
On-Page Optimization | | EricPacifico0 -
How impactful will text at the bottom of the page be?
If the most important content for humans on my page is images (e.g., a picture gallery), but there is very little text high up on the page, how impactful will a text description at the bottom of the page be? I've seen a few other sites put content paragraphs at the bottom of their pages. LIke so: http://www.purpletrail.com/invitations-online http://www.tinyprints.com/ Is this something I would do well to emulate?
On-Page Optimization | | Ehren0 -
Does a scrolling text area carry juice?
I'm seeing a lot of companies in my industry loading the homepage with text by using a scrolling text area. Do the search engines see this as valid text or is it a cloaking method that carries less weight?
On-Page Optimization | | LabadieAuto0