HTTP_ REFERER is empty for popup window

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear :

In my web page I'm always checking the referer page if it was empty I do
something else also I do something :0).

the problem in my ASPX page client side I did a popup window, and when request

Request.ServerVariables["HTTP_REFERER"] is empty for the popup window, why?
thought the parent page ins (myPage.aspx).
how can I get the parent page of the popuped window?

Regard
 
From client side you can get it using window.opener and pass it to server
side. From server side if try to access it using http_referrer, it will be
empty only as it is a new page.
 
the problem now I have hunderds of pages that do window.open for popup
window, and I'm checking the Request.ServerVariables["HTTP_REFERER"] in
Global.ascx ->Application_BeginRequest event, so with ur soluation I have to
change all pages and this not possible for me, is there any alternate
soluation for always getting the parent window for popup ones.

Regards

Saravana said:
From client side you can get it using window.opener and pass it to server
side. From server side if try to access it using http_referrer, it will be
empty only as it is a new page.

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com


Raed Sawalha said:
Dear :

In my web page I'm always checking the referer page if it was empty I do
something else also I do something :0).

the problem in my ASPX page client side I did a popup window, and when request

Request.ServerVariables["HTTP_REFERER"] is empty for the popup window, why?
thought the parent page ins (myPage.aspx).
how can I get the parent page of the popuped window?

Regard
 
You're in trouble because HTTP_ REFERER doesn't have to be filled in and a
lot of proxy servers and I think some software firewalls strip out the HTTP_
REFERER values.
 
Scott said:
You're in trouble because HTTP_ REFERER doesn't have to be filled in
and a lot of proxy servers and I think some software firewalls strip
out the HTTP_ REFERER values.

Absolutely. Referer is nice for statistical purposes (who links to my
site?), but using it for true application functionality is just disaster
waiting to strike ;-)

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top