W3C home > Mailing lists > Public > www-talk@w3.org > January to February 2000

Re: problem

From: Mukul Gandhi <mgandhi@bhartitelesoft.com>
Date: Mon, 31 Jan 2000 10:29:22 +0500
Message-Id: <3.0.1.32.20000131102922.0070b3b8@202.56.229.147>
To: Igor Clark <igor@forefrontconsulting.co.uk>
Cc: www-talk@w3.org
Thanks a lot ! Your suggestion solved my problem. I have tested with
Netscape Communicator 4.5 and IE5. With both its working fine. But I want
to understand how the HTTP protocol operates if I send Location header and
when I send Refresh header from the PHP script ?
My understanding is that, when the PHP script does header("Location :
http://www.php.net") it actually makes a new HTTP request and so a new HTTP
request/response takes place(just like when browser requests a new URL).
Thats why cookies don't get set when Location header is sent. In my
original mail I mentioned original HTTP response gets aborted. I still
believe in that. 
But when Refresh header is sent no new HTTP response gets created and
cookies get set. Hope I not sounding hypothetical!
What actually takes place in terms of HTTP, when I press browser refresh
button ? 

regards
-mukul


At 10:50 AM 1/27/00 +0000, you wrote:
>Hiya
>
>I think this might relate to how the php implementation of setCookie is
>working and what order things get done in after a page compile.
>
>You could:
>
>(a) Try using header("Set-cookie: Name=etc");
>(b) Try using a Refresh header instead:
>
>	Refresh: 0; URL='http://www.php.net'
>
>(c) Send an HTML document with a <script> that sets the cookie and does
>the redirect client-side
>
>Also, I'm not quite clear what you mean by
>
>> header statement
>> causes a new HTTP response to occur with fresh header and body which
>> contain no cookies.
>
>An HTTP response is only issued if the client makes an HTTP
>request. Perhaps there is a client issue - what browser are you using?
>
>Good luck,
>Igor.
>
>--
>Igor Clark
>igor@forefrontconsulting.co.uk


--------------------------------------------------------------
Bharti Cellular Limited, New Delhi, India
Received on Monday, 31 January 2000 00:03:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 October 2010 18:14:24 GMT