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
-
Will shortening down the amount of text on my pages affect it's SEO performance?
My website has several pages with a lot of text that becomes pretty boring. I'm looking at shortening down the amount of copy on each page but then within the updated, shortened copy, integrating more target keywords naturally. Will shortening down the current copy have a negative effect on my SEO performance?
On-Page Optimization | | Liquid20150 -
When trying to sculpt an internal link structure, is there any point in placing text links to top level pages that are already in the main menu?
Does Google recognise a link in the content if there is already a link in the menu? My understanding is that Google only counts the first link it finds.
On-Page Optimization | | bittristo0 -
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 -
Background Images and ALT text
We pretty much exclusively use background images for our sites. How do I add in alt text? I tried a Google search for this issue and the best answer I could find was "Use the 'title' tag in the containing div", but that was from 2010. Is there a better way to do it? And no, we're not going to switch to using standard images, because background images are way more slick for UX.
On-Page Optimization | | MichaelGregory0 -
Is moving text out of the main body field a bad idea for SEO?
Hi, I manage this WordPress website http://www.the-fireplace-company.co.uk I've been looking for ways to improve the product template and have come up with the following http://www.the-fireplace-company.co.uk/product/the-alhambra-fireplace/ - you can see how this compares to the old template http://www.the-fireplace-company.co.uk/product/the-burlington-fireplace/ Basically I've moved the description copy for the product from the main body to an alternative field and disabled the reviews tab below the product images to give a more compact feel and better use of the space available in my humble opinion! The client approves too. However I was just about the change all the other products to match this one - but suddenly thought is is wise to move all text out of the main body just to improve the look? I wondered what impact this might have on search. Any pointers would be welcomed. One course of action might be to find a new theme that's just a little more accommodating! Or to develop this theme further to ensure the main body copy is displayed where I want it to be? Regards to the Moz community - thanks for reading. Nathan
On-Page Optimization | | nathangdavidson0 -
Is minor duplicate content on my website okay?
I know duplicate content across multiple websites is not a good thing, however I've always wondered about minor duplicate content on your own website. I know its good practice to have unique content on each page but what about the little stuff. For example on our website certain related pages share the same content in a right sidebar. Such as links to pdf leaflets, or "you can read our blog etc" . Is there a minimum number of repeated words required before its flagged as duplicate content? Another example is a customer gave two testimonials for two of our employees - the testimonials were identical other than the employee names - if these were posted on separate pages is it a problem for the site as a whole or for both those individual pages? Thanks
On-Page Optimization | | Brabian0 -
Link anchor text in list menus
Obviously Google likes descriptive anchor text. At least the first version on the page. But suppose you had a list of scrap yard depots on a hover site menu, would you go for the person friendly nested list, so Scrap Yard Depots Newcastle Chester Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch Or the presumably more Google friendly; Scrap Yard Depots Newcastle Scrap Yard Chester Scrap Yard Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch Scrap Yard
On-Page Optimization | | JamesFx0 -
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