Content within JavaSccript code
-
I know that it is not a good practice to inlcude SEO content within JavaScript, but are there exceptions to what Google can spider or is it best to just avoid completely?
-
Thank you for the quick responses.
Thanks,
Matthew
-
From my perspective, whenever possible you want to make your JavaScript content degrade gracefully. Basically, if a visitor has JavaScript turned off, they still have access to the content they would see if JavaScript was turned on. This also eliminates the need to worry about whether searchbots can or cannot spider such content.
As an example, consider a JavaScript based image carousel. With JavaScript turned on, the user can cycle through the images in a (usually) user friendly way via the carousel controls. With JavaScript turned off, the user can still see the images, but may have to click on them to see them displayed in the browser window - not as slick, but not bad either.
One key aspect to this type of development is writing well organized markup / code / scripts that allows for your JavaScript to be seperated from your HTML.
A great resource for learning about this is DOM Scripting by Jeremy Keith.
-
Hi Mjmorse,
What do you mean by SEO content? Do you mean that your content is only targeted for search engine spiders?
In case your content is also targeting the actual real users that will visit your website, I suggest you avoid javascript for content in case some of them are using mobile device with limited javascript support.
Plain text content right in the HTML is always preferable over dynamicaly loaded content from JS. Using javascript is usualy a way to hide content to search engines, not the opposite.
Best regards,
Guillaume Voyer. -
A simple javascript that does something like document.write is fine. Google can execute a lot of javascript now. The key is to to webmaster tools and fetch the page as googlebot. Then you can see what Google can see on your page. If you have SEO content in a javascript and Google cannot see it, I would change it. If Google can see it and index it just fine, no problems.
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 the content in Joomla modules get indexed
Hello Moz, we are using Joomla to build websites. In Joomla you can put content in modules. What we would like to know if would search engines index content in modules, as it does with content attached to menu links? Thanks Ian
On-Page Optimization | | Substance-create0 -
Would you consider this to be thin content
I always struggle with these pages I have on my site going back and forth debating what I want to do with them. On one side Google was content, yet at the same time its all about user experience. http://www.freescrabbledictionary.com/word-lists/words-that-start-with/letter/h/ I used to have all my words listed on one page which could have been well over 10,000. Now I pagination them as you can see. I debate writing a header of content for these pages, but honestly users just want the words. Get in, get what you need and get out. What is the recommendation on these pages. Should I write content? Should I not?
On-Page Optimization | | cbielich0 -
How to optimize WordPress Pages with Duplicate Page Content?
I found the non WWW ans WWW duplicate pages URL only, more than thousand pages.
On-Page Optimization | | eigital0 -
What to do about resellers duplicating content?
Just went through a big redevelopment for a client and now have fresh images and updated content but now all the resellers have just grabbed the new images/content and pasted them on their own site. My client is a manufacture that sells directly online and over the phone for large orders. I'm just not sure how to handle the resellers duplicate content. Any thoughts on this? Am I being silly for worrying about this?
On-Page Optimization | | ericnkatz0 -
Duplicate content penalty
when moz crawls my site they say I have 2x the pages that I really have & they say I am being penalized for duplicate content. I know years ago I had my old domain resolve over to my new domain. Its the only thing that makes sense as to the duplicate content but would search engines really penalize me for that? It is technically only on 1 site. My business took a significant sales hit starting early July 2013, I know google did and algorithm update that did have SEO aspects. I need to resolve the problem so I can stay in business
On-Page Optimization | | cheaptubes0 -
What content is apropriate here
Hello, I've got a dozen good articles in my article section, but nobody is landing on them. Should we write articles about our products? Won't that compete with our product pages?
On-Page Optimization | | BobGW0 -
Exponentially Increasing Duplicate Content On Blogs
Most of the clients that I pick up are either new to SEO best practices, or have worked with sketchy SEO providers in the past, who did little more than build spammy links. Most of them have deployed little if any on-site SEO best practices, and early on I spend a lot of time fixing canonical and duplicate content issues alla 301 redirects. Using SEOMOZ, however, I see a lot of duplicate content issues with blogs that live on the sites I work on. With every new blog article we publish, more duplicate content builds up. I feel like duplicate content on blogs grows exponentially, because every time you write a blog article, it exists provisionally on the blog homepage, the article link, a category page, maybe a tag page, and an author page. I have a two-part question: Is duplicate content like this a problem for a blog -- and for the website that the blog lives on? Are search engines able to parse out that this isn't really duplicate content? If it is a problem, how would you go about solving it? Thanks in advance!
On-Page Optimization | | RCNOnlineMarketing0 -
Duplicate Content for Spanish & English Product
Hi There, Our company provides training courses and I am looking to provide the Spanish version of a course that we already provide in English. As it is an e-commerce site, our landing page for the English version gives the full description of the course and all related details. Once the course is purchased, a flash based course launches within a player window and the student begins the course. For the Spanish version of the course, my target customers are English speaking supervisors purchasing the course for their Spanish speaking workers. So the landing page will still be in English (just like the English version of the course) with the same basic description, with the only content differences on that page being the inclusion of the fact that this course is in Spanish and a few details around that. The majority of the content on these two separate landing pages will be exactly the same, as the description for the overall course is the same, just that it's presented in a different language, so it needs to be 2 separate products. My fear is that Google will read this as duplicate content and I will be penalized for it. Is this a possibility or will Google know why I set it up this way and not penalize me? If that is a possibility, how should I go about doing this correctly? Thanks!
On-Page Optimization | | NiallTom0