Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > can JS suss out "on-site" vs off-site HTTP requests?

Reply
Thread Tools

can JS suss out "on-site" vs off-site HTTP requests?

 
 
Word Painter
Guest
Posts: n/a
 
      12-05-2006
this may be more of an "html" issue, but I'll wing it.

i've got a multi-language site, where the home-page of each language group
features a link to a popup window that offers background info on site
management. the popup is fired by a javascript function, when they click
the site management link. there's also a "window close" function button so
they can nuke it as they please.

now, oddly, people who search for my site in the chinese language on google,
are sent directly to the site management popup window, which of course,
opens in their "full" browser window, and which also has no links back to
the main site, because it's meant to open only as an "accessory" to the main
site.

my question is this: is there any way, with Javascript, that I could
determine if they arrived at this window from "off-site" (ie, a google
search), and therefore offer such "off-site" visitors a link back to the
principal site, a link that would be hidden for visitors who clicked the
popup window from my own site?

hope this is not confusing...! Thanks for any help offered.


WordPainter


 
Reply With Quote
 
 
 
 
naixn
Guest
Posts: n/a
 
      12-05-2006
Word Painter wrote :
> this may be more of an "html" issue, but I'll wing it.
>
> i've got a multi-language site, where the home-page of each language group
> features a link to a popup window that offers background info on site
> management. the popup is fired by a javascript function, when they click
> the site management link. there's also a "window close" function button so
> they can nuke it as they please.
>
> now, oddly, people who search for my site in the chinese language on google,
> are sent directly to the site management popup window, which of course,
> opens in their "full" browser window, and which also has no links back to
> the main site, because it's meant to open only as an "accessory" to the main
> site.
>
> my question is this: is there any way, with Javascript, that I could
> determine if they arrived at this window from "off-site" (ie, a google
> search), and therefore offer such "off-site" visitors a link back to the
> principal site, a link that would be hidden for visitors who clicked the
> popup window from my own site?
>
> hope this is not confusing...! Thanks for any help offered.
>
>
> WordPainter
>
>


http://developer.mozilla.org/en/docs/DOM:window.opener

This may help you if you use window.open to open your link
It allow you to have a reference on the opener window. If none, it means it has
been accessed directly, and then should be redirected.

You also have the $_SERVER['HTTP_REFERER'] in PHP, and the equivalent may exist
in many other web languages

--
Naixn
http://fma-fr.net
 
Reply With Quote
 
 
 
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      12-11-2006
naixn wrote:

> You also have the $_SERVER['HTTP_REFERER'] in PHP, and the equivalent may
> exist in many other web languages


It is well known that Referer coding simply does not work on the Web, since
not all UAs submit that header, depending on the security level and user
preferences.


PointedEars
--
Let us not judge others because of their religion, color or nationality.
We are all just human beings living together on this planet. (poehoe.de)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTP SOAP/HTTP GET/HTTP POST milan_9211 Software 0 01-10-2011 02:10 PM
HTTP::Post - HTTP::Get (Can someone help me?) Fred Ruby 17 04-25-2008 07:12 PM
Can I change the response URL to http://server/page.XLS instead of http://server/page.ASPX ? guillermojco@gmail.com ASP .Net 3 04-26-2007 04:49 AM
how can i simulate my pc as http server by writing java code to send the http response by socketstream to some pc in the internet?! mike Java 5 09-21-2004 02:04 PM
SUSS.exe Please help Troy MCSE 4 09-12-2003 05:43 PM



Advertisments