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.
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 having landing page text beneath the products at the base of the page hinder SEO?
I have a site that is capable of hosting the landing page description either above the products under the H1 or below them at the bottom of the page before the footer. I have always chosen to keep the text "above the fold" as presumably this would be crawled sooner in relation to the rest of the page content than had it been at the bottom. However, this means that I can only really write just a few sentences for each landing page - otherwise the products would shift further down the page - and I don't think this is good from a UX POV. Question: If I move the bulk of my landing page descriptions to the text snippet located underneath the products, could this negatively affect my SEO? Text at the bottom of the page is obviously not significant for users, so is there a chance this could be seen as spam?
On-Page Optimization | | Silkstream0 -
Internal Links: Navigation Bar vs. Body Text
Hello. I have a page on our site that is especially popular and has many inbound links. This page has the same site navigation buttons (at the top) as every other page on the site. Do these site navigation buttons pass along link juice to other pages in the same way that an internal link would elsewhere on the page? Thank you!
On-Page Optimization | | nyc-seo0 -
Is this duplicate content okay?
We have a client who wants to rank locally, nationally and internationally for their products. I wrote a line that goes, "We can ship our products to you whether you’re here in Illinois, nationwide, or international." I added that line after a paragraph or two of unique product description on each of their 30-odd product pages. Will this damage their ranking? I tried researching this but only found full page duplicate content topics. Any advice would be great.
On-Page Optimization | | optimalwebinc0 -
How can I stop google reading a certain section of text with my H1 tag?
Hey Mozzers, I'm wondering if anybody knows of a way that I can stop google reading a certain part of text within my H1 texts? My issue is that I have individual office pages on my site, but many offices are based in the same city; such as 'London'. I want to keep London within the H1 tag for user experience but I do not want it to be picked up by the search engines and start a canonical issue. I've seen some people say to use document.write or use an image. Does anybody know of a correct way of doing this? Many Thanks.
On-Page Optimization | | Lakeside0 -
Does it matter what text you wrap in an H1 tag?
Typically H1 tags are reserved for page headings, i.e. on a blog post the blog post title is very often the pages H1, or top-level heading as the W3C puts it. On the SEOmoz home page they currently have "SEO Software." as their H1 tag, which seems perfectly reasonable and to me fits the W3C criteria. However, what if the primary keyword for SEOmoz was "seo community" so they decided to wrap just those two words in the sentence that follows on their home page and maintain the existing style of the words "seo community" with CSS. (see attachment) Are there any arguments against doing that? Would Google be able to detect this? If so, would Google care? I do believe the overall importance of the H1 tag has lessened to a degree, however I still believe they are valuable to an extent and would love to hear anyone's thoughts. 7NZcD.png
On-Page Optimization | | TakeLessons1 -
Better for SEO to use a hyphen in the name of a website to break up text?
To maximize SEO, would it be better to use a hyphen between two words in the name of a website? For instance, www.londonparis.com or www.london-paris.com. Would it be OK to use www.LondonParis.com Many thanks in advance, Ricardo
On-Page Optimization | | RicardoMello0 -
Is there an SEO penalty for text that appears only in a pop-up box when you hover the mouse over an icon?
A client of mine wants to streamline the look of his web pages, taking some of the visible body copy and putting it into boxes that pop up when you hover the mouse over an icon. My understanding is that search engines will index this pop-up text. However, do they penalize pages that have text in pop-up boxes out of concern that those pages are spammy? In this case, the text and the page are perfectly legitimate e-commerce pages. Thanks for any insights you can offer.
On-Page Optimization | | jimmartin_zoho.com0 -
On page internal link text
Hi, I'm in the process of rebuilding/designing an existing well ranking niche bespoke software site and have the following question - In the footer, I'm planning on linking to the main landing pages (blue widget software, red widget software etc theres about 7 in total). In these links I want to know if its best to have the word "software" in each link as I'm scared of it looking spamy. We sell custom software, and a lot of the keywords that currently attract traffic (as reported in analytics) end in the word software, for example - blue widget software red widget software In the footer would you end each link with software or not? How much effect would this have on rankings? Thanks in advance.
On-Page Optimization | | JamesJacobs0