Forum Moderators: open

Message Too Old, No Replies

Java Script to force child orphan page to parent frameset

How might Google interpret this?

         

eveolasov

2:27 am on Jan 15, 2004 (gmt 0)

10+ Year Member



Lately Google has picked up many of my internal middle content pages which are now competing with my complete frame pages. I found this script below and it does the job beautifully. The only problem is that this results in the url in the browser looking strange indeed. Might Google interpret this as spam of some sort. I rank high so I'm worried.

<script language="javascript" type="text/javascript">
<!--
if (top.location == self.location) { //if page is not in its frameset
top.location.href = "http://www.example.com/page.htm" + "?" + window.location.href;
}
//-->
</script>

_____________________________________ABOVE GOES IN CHILD ORPHAN

<script language="javascript" type="text/javascript">
<!--
pageURL = "www.example.com/Resource-4023/page.htm";
if (parent.document.URL) {
parentURL = parent.document.URL;
if (parentURL.indexOf('?')!= -1) {
pageURL = parentURL.substring(parentURL.indexOf('?')+1,parentURL.length);
}
}
function fillFrame() {
parent.main.location.href = pageURL;
}
//-->
</SCRIPT>

________________________ABOVE GOES IN FRAMESET HEAD
------------------

Anyone have a clue?

[edited by: tedster at 8:00 am (utc) on Jan. 15, 2004]
[edit reason] use example.com [/edit]

tedster

8:09 am on Jan 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've used an approach something like this for several years - no problems. However, the approach I use does not have obvious URLs in the javascript.

Google does not execute javascript, but they do look for text strings that look like a URL and therefore you might end up with some craziness using your exact approach.

Here's the code I use successfully, in our Generic Javascript [webmasterworld.com] thread, Message #21

eveolasov

2:18 pm on Jan 15, 2004 (gmt 0)

10+ Year Member



Thank you Tester. This sounds like the perfect fix. Would you be kind enough to e-mail the script to me with the portions that I need to replace with my URL or files. I'm a Realtor and not a web designer by trade but have ended up creating 5 highly rates sites with the trial and error method along blood sweat and tears.

eveolasov

2:30 pm on Jan 15, 2004 (gmt 0)

10+ Year Member



Tester, I just re-read the script you use to fix the orphan child pages and it looks as though this master frameset would in effect be creating yet another URL - is this correct? I already have google pulling up both my content orphan page and the master frame page back to back in the results. I can't imagine how the bot doesn't view this as duplicate content. Since the most recent dance I'm seeing dozens of my pages ranking on page one with this problem. My competitors are going to be livid and will probably send a Google Spam e-mail although this probably will do nothing since Google is clearly on their own agenda regarding spam which I don't intentionally do.

tedster

7:37 pm on Jan 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, the script does require one - and only one - new html page. As I said, I've had no trouble with it with Google or anyone else. It's totally legit, non-spammy in both intent and effect.