Forum Moderators: open

Message Too Old, No Replies

Getting pop-up window content into the SEs

         

tedster

8:54 am on Oct 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I feel like I've been very slow on the uptake with this one, but at least I found an answer.

Most of the time, the sites I work with have pop-up windows that I'd rather NOT see in the search engines -- enlargements of graphics and things like that. But I have one client who uses lots of pop-ups in their educational section, and the content is serious spider food.

Here's my newly found resolution:

The Pop-up Function
First I use a javascript function that allows me to give each pop-up window a different name (as we discussed in this thread [webmasterworld.com])

The Link:
<a href="url.html" onClick="popUpFunction('url.html','windowname');return false">Link Text</a>

That way, everyone running javascript gets the pop-up window, and the spiders see a vanilla link they can follow. Until I stumbled onto this, I was going crazy with complicated methods [they were a bit on the grey side ;-) ] to hide links from visitors but still give them to spiders.

The Pop-up Document
I include a script at the bottom that checks the window name. If it's not the one that the pop-up function assigns, then I know the visitor came from a search engine and is looking at an independent window, not a pop-up. So I use document.write to give the Search Engine visitor some serious navigation to get into the main site and the regular pop-up user gets a "Close Window" link. The finishing touch: a <noscript> tag gives site navigation links to the visitor with js turned off.

This technique quadrupled the content this client has to offer the Search Engines. I'm glad I found it, and I'm all ears for any improvements/simplifications.

JuniorHarris

2:30 pm on Oct 20, 2001 (gmt 0)

10+ Year Member



Interesting tip...curious how well the pages rank.

rcjordan

4:24 pm on Oct 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>improvement

A minor one, perhaps. This method would support the title attribute; title="Click here to go to blahblah"

?? Question: I'm combining the functions on the page you referenced. In the following, what does the term "popup" do? Isn't it a window name? And, if so, doesn't it need to match the name down in the body ('windowname')?

<head>
<SCRIPT LANGUAGE="Javascript1.2">
function puFunction(url, www, hhh)
{window.open(url,"popup",'width=' + www + ',height=' + hhh + ',left=50,top=50,screenX=50,screenY=50');
}
</SCRIPT>
</head>
<a href="http://somedomain.com/" title="Click here to go to blahblah"
onClick="puFunction('http://somedomain.com/','windowname');return false">Link Text</a>

(edited by: rcjordan at 4:44 pm (gmt) on Oct. 20, 2001

Macguru

4:29 pm on Oct 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't want to break the JS party but I just do hallway pages for all the sites anyways.

rcjordan

4:46 pm on Oct 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>hallway pages for all the sites anyways

So do I. ;)

tedster

8:12 pm on Oct 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>> Interesting tip...curious how well the pages rank

So far so good (they've just started to appear, this month, so I can't give a comprehensive answer yet.) They should do well because most of these pop-ups are tightly focused "expanded information" on one sub-sub-topic from the main page -- like "red widgets in Mexico". The pop-up's are very simple HTML pages and easily optimized.

> support the title attribute
Yes, it's a straight HTML link so the title attribute is fine. I had some concern that return false would deactivate the tool-tip, but it doesn't

> combining the functions on the page you referenced

Right, I could have been more complete -- you need to have the window name in the function's variable list to assign your chose unique name to each pop-up window. So an example of the function definition:

function cPop(url, windowname, www, hhh) {window.open(url,windowname,'width=' + www + ',height=' + hhh);
}

and the link:
<a href="url.html" title="click here for foo two" onClick="cPop('foo_two.html','foo_two',350,250);return false">foo two - more information</a>

and the sniffer javascript for the pop-up's document:
if (window.name == "foo_two")
{document.write('<a href="javascript:window.close()">Close This Window</a>')
}

else
{document.write('whatever nav links coding you need')
}

> hallway pages for all the sites anyways
This particular "educational section" is only 12 principal pages but they each house 40 to 50 supplementary pop-ups. So this method makes each main page itself into a hallway page.

Since pages of mostly links became more and more suspect at the SEs, I started creating my content pages themselves as hallways wherever possible. It avoids any appearance of trying to persuade the algorithm, even for the most purist, academic definition.

Macguru

8:28 pm on Oct 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Pretty smart tedster,

Do you have the feeling that the link text used to open the pop up score as well on most SE than if it was used in plain vanilla HTML?

BTW, I also believe some good hallway is not mostly made of links.

tedster

8:42 pm on Oct 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



From a spider's eye view it's the same thing as a rollover image link, with the advantage that there is actual link text. This code just changes onMouseover to onClick -- but the spiders are deaf to the javascript anyway. So it should be smooth sailing, AFAIK.

The piece that eluded me was the ";return false" part. Without that you get a pop-up window when you click, but the main window also goes to the linked URL. Definitley NOT the desired effect.

Macguru

9:09 pm on Oct 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sorry to bring this up again, but if rollover images scored as good as link text, I wouldn't.

Anybody heard of some good JS we could write on page and call from a _blank link text, to mimmic the popup?

tedster

9:40 pm on Oct 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not quite getting you, macguru. This IS link text. It's not an image.

I just brought up roll-over links issue because spiders do follow them, and this code is parallel, so spider will follow it. AND they get text.

Macguru

9:59 pm on Oct 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sorry tedster,

I could have missed that part: "with the advantage that there is actual link text", but I didn't.

I will try those HTML/popups links on some test sites to be convinced.
Still not sure some share of the search market spiders gets it.

tedster

12:23 am on Jan 10, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



One of the advantages of the method I outlined here has been that visitors with pop-up killers installed (including javascript turned off altogether) still get the pop-up content when they click on a link -- it just loads in the same window.

The client with the site where I began using this technique called me this week to tell me that he was doing some academic research on Google, and found one of his own pop-ups at #1 for a two word phrase.

A check shows Google has indexed most of these pages. However, no other engine so far. Not that there are that many true spidering engines left ;)