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
-
Duplicate Content - Pricing Plan tables
Hey guys, We're faced with a problem that we want to solve. We're working on the designs for a few pages for a drag & drop email builder we're currently working on, and we will be having the same pricing table on several pages (much like Moz does). We're worried that Google will take this as duplicate content and not be very fond of it. Any ideas about how we could integrate the same flow without potentially harming ranking efforts? And NO, re-writing the content for each table is not an option. It would do nothing but confuse the heck out of our clients. 😄 Thanks everybody!
On-Page Optimization | | andy.bigbangthemes0 -
If others are reposting your content, how do you tell Google you are the original author?
A huge amount of my content is being copy and pasted to facebook, tumblr, wattpad etc... Is there an easy way to tell Google I am the original author? (How can I tell if this content theft affecting my rankings?)
On-Page Optimization | | brianflannery0 -
How Does Google Webmaster Tools Come Up with Content Keywords?
When I look at Google Webmaster Tools, in the Content Keywords report there are a couple of ones that are suspect - "prescription", "medications", and "viagra" which are completely unrelated to the content of the site. When I click on the content keyword, and search the source code for those pages, I don't see those words in the source code. Can someone please help me figure out why Google thinks that these keywords are associated with these pages, and how to correct it?
On-Page Optimization | | bernardablola0 -
Duplicate Content
I'm currently working on a site that sells appliances. Currently, there are thousands of "issues" with this site, many of them dealing with duplicate content. Now, the product pages can be viewed in "List" or "Grid" format. As Lists, they have very little in the way of content. My understanding is that the duplicate content arises from different URLs going to the same site. For instance, the site might have a different URL when told to display 9 items than when told to display 15. This could then be solved by inserting rel = canonical. Is there a way to take a site and get a list of all possible duplicates? This would be much easier than slogging through every iteration of the options and copying down the URLs. Also, is there anything I might be missing in terms of why there is duplicate content? Thank you.
On-Page Optimization | | David_Moceri0 -
Old landing page modifications - should I change the content?
One of our most popular landing page is starting to be a little bit out dated, should I keep the old content and update with newer text or is it safe to completely replace the old content with the new content without losing our organic traffic on this page?
On-Page Optimization | | rusted880 -
Duplicate content list by SEOMOZ
Hi Friends, I am seeing lot of duplicate (about 10%) from the crawl report of SEOMOZ. The report says, "Duplicate Page Content" But the urls it listed have different title, different url and also different content. I am not sure how to fix this issue.. My site has both Indian cinema news and photo gallery. The problme mainly coming in photo gallery posts. for example: this is the main url of a post. apgossips.com/2012/12/18/telugu-actress-poonam-kaur-photos . But in this post, each image is a link to its enlarged images (default wordpress). The problem is coming with each individual image with in this post. examples of SEOMOZ report 3 individual urls as duplicate content...from the same above post.: http://apgossips.com/2012/12/18/telugu-actress-poonam-kaur-photos/poonam-kaur-hot-photo-shoot-stills-4 http://apgossips.com/2012/12/18/telugu-actress-poonam-kaur-photos/poonam-kaur-hot-photo-shoot-stills-3 http://apgossips.com/2012/12/18/telugu-actress-poonam-kaur-photos/poonam-kaur-hot-photo-shoot-stills-2 Some body please advise me.. Appreciate your help.
On-Page Optimization | | ksnath0 -
Index.php getting Duplicate page content.
I am quite new to SEO and have now got my first results. I am getting all my index.php pages returned as Duplicate page content. ie: blue-widgets/index.php
On-Page Optimization | | ivoryred
blue-widgets/ green-widgets/large/index.php
green-widgets/large/ How do solve this issue?0 -
Checking for content originality in a site
two part question on original content How would you go about checking if a site holds original content accept the long search quary within Google? ans also if I find many sites carrying my content and I am the original source should I replace the content? thanks
On-Page Optimization | | ciznerguy0