Solved

Define Variables to use in Template in SEO Friendly Way

Posted on 2013-01-27
3
223 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 53

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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

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.
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

740 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