Solved

Define Variables to use in Template in SEO Friendly Way

Posted on 2013-01-27
3
221 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

786 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