Solved

Define Variables to use in Template in SEO Friendly Way

Posted on 2013-01-27
3
222 Views
Last Modified: 2013-01-29
I am using a restrictive shopping cart that has limited options for customization.
Basically what I'm trying to do is define a string of text within an individual product description and then use that text within the product template in any way that I want.

I am currently doing this with a JS variable and then using document.write to print it to the page. That works perfectly, but I am worried that Yahoo/Bing won't be able to index that content properly. Would using Jquery's .append to a DIV be any better? Should I define this content within a DIV somehow to be used later? I don't want to be penalized for hidden or duplicate content.
What is the best, most SEO friendly, way to do this? Thanks!!

Product Description:

<script>
var test = "Test text string.";
</script>

Open in new window

Product Template:

<script>
document.write(test);
</script>

Open in new window

0
Comment
Question by:lowpriceskates
  • 2
3 Comments
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 38825191
What you are doing is not optimum but it sounds like it is all you can do.  With that, I would continue.  I have seen mixed reports but I trust the findings here  http://www.seomoz.org/ugc/can-google-really-access-content-in-javascript-really
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 38825395
var test = "<div>Test text string.</div>";
for a string with a linefeed.
var test = "<span>Test text string.</span>";
For a string without a linefeed

Cd&
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 38825412
Google CAN detect document.write if it is in the body, but not if it is run from a function: though it will not necessarily penalize for it unless there is an excessive number of keyword phrases which it will consider as tuffing, and then you get hammered big time.

Cd&
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question