469,608 Members | 1,547 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,608 developers. It's quick & easy.

Post Form without referrer

Hi!!

i have a major problem, and i've been searching for a solution for
about 2 weeks, but havent found one.

i have to do a POST-Request to a server, but the server shouldnt know
my referrer. i know it would be quite easy to accomplish this with a
simple php-Script, but the problem is that i need the browser (client)
to do this POST, so that the answer comes directly back to the client,
and not first to the php-server and then to the browser.

why that? because the page i get back requests the cookie (with
document.cookie), and therefore the page has to come directly from
server.

i tried the xmlhttpconnection object to connect to the server and
manipulate the header, to send the request without a referrer, but the
answer isnt directly shown in the browser, but has to be requested from
the xmlhttpconnection, so therefore access to the cookie isnt possible.

i just need to make the browser to send the POST-Request without the
referrer, and get the answer directly back from the server, so that the
browser can access document.cookie.

another important thing is that i dont want to change the browser
settings!!!!!!

i know that you can send get-requests without referrer by using
document.location=....., but how can you do it with forms that use
post????

please help me!!!!!!

thanks Alex, if you have any further questions, please dont mind to
post them, thanks

Jul 23 '05 #1
3 4180
Alex wrote:
Hi!!

i have a major problem, and i've been searching for a solution for
about 2 weeks, but havent found one.

i have to do a POST-Request to a server, but the server shouldnt know
my referrer. i know it would be quite easy to accomplish this with a
simple php-Script, but the problem is that i need the browser (client)
to do this POST, so that the answer comes directly back to the client,
and not first to the php-server and then to the browser.

why that? because the page i get back requests the cookie (with
document.cookie), and therefore the page has to come directly from
server.
Post from PHP and include the cookie in your request headers, assuming
you can get it. If you can't, you probably shouldn't be trying.

Either way, using the HTTP request objects of PHP or JavaScript won't
give the 'page you get back' a document.cookie anyway-- JavaScript on
that page won't be executed.

Or maybe I just misunderstood.

i tried the xmlhttpconnection object to connect to the server and
manipulate the header, to send the request without a referrer, but the
answer isnt directly shown in the browser, but has to be requested from
the xmlhttpconnection, so therefore access to the cookie isnt possible.

i just need to make the browser to send the POST-Request without the
referrer, and get the answer directly back from the server, so that the
browser can access document.cookie.
The cookie is returned in a header.
http://groups-beta.google.com/group/...+header&rnum=6
i know that you can send get-requests without referrer by using
document.location=....., but how can you do it with forms that use
post????

Maybe by a page that doesn't exist... by opening a window, write()ing a
document to it, and then posting from that document. Just a thought. I
have no idea if it actually works.

Of course, if you do that, you'll have no access to the document that's
returned if it's from a different domain.

please help me!!!!!!

thanks Alex, if you have any further questions, please dont mind to
post them, thanks


Why would you want to POST without a referer? Why can't you access the
cookie by normal means already? Sounds like you're trying to do
something that really oughtn't be done....

Jul 23 '05 #2
i know that you can send get-requests without referrer by using
document.location=....., but how can you do it with forms that use
post????

Maybe by a page that doesn't exist... by opening a window, write()ing a
document to it, and then posting from that document. Just a thought. I
have no idea if it actually works.


thanks for your answer, christopher.

your idea sounds very interesting, anyone has ever tried this out, i
tried to open a new window with newWindow = window.open
("about:blank",...) and then write code into it with
newWindow.document.write("<form...."); but the referrer is the location
of the main-site. has anyone ever made a form that sends no referrer??
i need a guru *gg*

thanks
alex

Jul 23 '05 #3
can someone help me???

Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jay Davis | last post: by
2 posts views Thread by Fernando Rodríguez | last post: by
5 posts views Thread by Nospam | last post: by
5 posts views Thread by Thom Little | last post: by
2 posts views Thread by Aaron | last post: by
reply views Thread by Solution2021 | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.