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 javascript generated content consider as regular content?
The website mentioned below, the content is generated using javascript, and content is something to do with Unicode char. The Unicode content creates as you scroll down. Will this content affect SEO https://www.myweirdtext.com/
On-Page Optimization | | teenmass423230 -
Canonical: Same content but different countries
I'm building a website that has content made for specific countries. The url format is: MyWebsite.com/<country name="">/</country> Some of the pages for <specific url="">are the same for different countries, the <specific url="">would be the same as well. The only difference would be the <country name="">.</country></specific></specific> How do I deal with canonical issues to avoid Google thinking I'm presenting the same content?
On-Page Optimization | | newbyguy0 -
Classified ads site and thin content + titles
Hello, i have two questions. Issue 1 is that we are a classified ads site. I started thinking, analyzing why im not ranking even tho i have a lot more content than others and my backlink profile is also better. Googling the advertisements i see that 95% of it is duplicate content. People usually who advertise, add the same add to 10 maybe 30 sites. For google this is duplicate content. Any ideas what to do? I can manually edit ads, to write a bit of unique content, but that is not a long term startegy. Question 2: My titles are all the same - Unique Name - Keyword im trying to rank for. There is around 1000 of such pages. Should i mix the titles up or it is still better to have 1 keyword which will help me to rank?
On-Page Optimization | | advertisingcloud0 -
Thoughts on archiving content on an event site?
I have a few sites that are used exclusively to promote live events (ex. tradeshows, conference, etc). In most cases these sites content fewer than 100 pages and include information for the upcoming event with links to register. Some time after the event has ended, we would redesign the site and start promoting next years event...essentially starting over with a new site (same domain). We understand the value that many of these past event pages have for users who are looking for info from the past event and we're looking for advice on how best to archive this content to preserve for SEO. We tend to use concise urls for pages on these sites. Ex. www.event.com/agenda or www.event.com/speakers. What are your thoughts on archiving the content from these pages so we can reuse the url with content for the new event? My first thought is to put these pages into an archive, like www.event.com/2015/speakers. Is there a better way to do this to preserve the SEO value of this content?
On-Page Optimization | | accessintel0 -
Content Mismatch
Hi, I've added my app to search console, and there are reported 480 content mismatch pages. How can I solve this problem?
On-Page Optimization | | Silviu0 -
Duplicate Content Indentification Tools
Does anyone have a recommendation for a good tool that can identify which elements on a page are duplicated content? I use Moz Analytics to determine which pages have the duplicated content on them, but it doesn't say which pieces of text or on-page elements are in fact considered to be duplicate. Thanks Moz Community in advance!
On-Page Optimization | | EmpireToday0 -
Indexed iframed content behind login
Hi, I have a question regarding iframed content. I would like to get my non cms content which is served via an iframe solution (from the same domain) behind a anonymous or personal login indexed by search engines. How can we make this work? I've looked at the following solutions: http://googlewebmastercentral.blogspot.nl/2008/10/first-click-free-for-web-search.htmlhttp://productforums.google.com/forum/#!topic/webmasters/l9n8oGLQRkUBut I would like the content to be crawlable deeper than the just one page (if this is possible using the iframe solution).We could also setup different new pages in our CMS with the same content...Any suggestions?Thanks!Arnout
On-Page Optimization | | hellemans0 -
Static content VS Dynamic changing content
We have collected a lot of reviews and we want to use them on our Categories pages. We are going to be updating the top 6 reviews per categories every 4 days. There will be another page to see all of the reviews. Is there any advantage to have the reviews static for 1 or 2 weeks vs. having unique new ones pulled from the data base every time the page is refreshed? We know there is an advantage if we keep them on the page forever with long tail; however, we have created a new page with all of the reviews they can go to.
On-Page Optimization | | DoRM0