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
-
Async JavaScript page load times affect on ranking.
Our company plan to use in our product page a live chat support app. But I concern about the page load time. The script is loading asynchronous and in the inner tests increase the average page load time with around one sec. Previously the load time was between 2.5-3.3 sec after the chat support increased to 3.8-5 sec, but sometimes there was extreme +10 sec worse results. My question is how much can this impact to our search engine rankings?
On-Page Optimization | | laszlo_muhi0 -
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 -
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 -
Replacing text with images
Hello, My client is a "cheap calls" site which is offering calls to around 300 countries in the world. The pages for each country are almost the same, as they are mostly terms and conditions of making a call and explanation of the process how to do it. The copy is quite long (more than 850 words) and the country name is repeated about 26 times in the text. The country name and the phone number is the main difference between the pages, which makes them almost the same. I have recommended to add testimonials to each country and towns within the country, but I am afraid it will not dilute the similarity between the pages enough for Google to stop seeing them as duplicated. Also the client do not exactly rush to publish the testimonials for every country. The rankings are not too bad and all seems fine, but in the long term I know we need to do something. I am not sure if the client would agree to shorten up the copy, as they believe in old style seo with keyword stuffing and bolded keywords but I would like to overcome that problem with exchanging the most of the copy with an image. I would write a new copy for each page making it unique (around 2-3 paragraphs) and the rest would be an image stating exactly the same thing as the copy now to provide the same amount of info to the user. Theoretically it should help to resolve this problem, but would like to check if anyone has done something like that and if it worked/may work. Are they any other implications?
On-Page Optimization | | ThinkingJuice0 -
Do you think using accordion text can hurt SEO?
I have a lot of text for my home page. My plan is to a J Query Plugin for accordion text. Does anyone think that this can hurt SEO efforts?
On-Page Optimization | | DTOSI1 -
What is html text?
I am using the "page attributes" tool for a guideline for what I am filling in on each page of my website. I feel like I've done my homework on this, but I can't figure out what "html text" is. URL Page Title Meta Description Meta Keywords H1 H2 **HTML Text ** ... not sure what to put here, how long it should be, what it's purpose is, etc. Any SEOMoz links helping me figure that out? I'm not finding it in the "Basics of Search Engine Design" article posted here on SEOMoz.
On-Page Optimization | | amandahx20 -
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 -
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