| 5:41 pm on Dec 1, 2002 (gmt 0)|
Meta Refresh is client side - it depends upon the client's computer to tick away the time to the alloted refresh point at which time the browser request the URL indicated.
header("location...") is server side and depends upon the PHP script calling it before it will send the new page to the client.
| 7:01 pm on Dec 1, 2002 (gmt 0)|
talks about some behaviours of refreshes with php. It might give some insight.
| 11:31 pm on Dec 1, 2002 (gmt 0)|
The Refresh HTTP header field is non-standard. As already mentioned by lorax it tells the UA to request a certain resource after a certain period of time.
The Location HTTP header field contains the location where the UA will find a certain resource. The exact meaning depends on the HTTP status code and/or context of other header fields. The UA will need to request the new resource.
Both methods originate at the server. Both methods tell the UA that it should do something locally, i.e. request a certain resource.
| 5:33 am on Dec 4, 2002 (gmt 0)|
Yep, this are the answers I need, thanks 3 of you.
So my worries is now confimed. My refresh, are used to redirect affliate link. (AL) An AL is actually another redirect too! So, my 1st page redirect it to the AL and the AL will redirect to the advertiser. The important role of the AL is to track the # of click and MOST important, plant a cookie to the visitor computer!
So if header is server side, does it means the cookie will not be planted in the visitor computer. And most likely is planted in the server computer?! :)
So my conclusion is - it is safer to use meta refresh to redirect AL. Please advice.
| 10:57 pm on Dec 4, 2002 (gmt 0)|
|So if header is server side, does it means the cookie will not be planted in the visitor computer. And most likely is planted in the server computer?! |
No. The server issues the http header and sends the http message to the client. The client then requests the new page.
The communication is always between client and server. The client requests a page the server answers: the resource is not here. Look at this URI and please store this cookie. It is then up to the client to decide whether he wants to request the resource from the new URI and store the cookie. If it decides to follow the serverīs advice, it will then request the resource from the other server which may either send back the resource in an http message with a 200 OK status, redirect the client again or do a lot of other things.
Always remember that with a Location or Refresh header one server does not redirect the client directly to another server. It just lets the client know where to look any further.
| 1:42 pm on Dec 5, 2002 (gmt 0)|
Hi Adrea, thanks very much for your information because I prefer the use of header more then meta refresh more because the refresh are a lot faster (in my case) and in the way of redirecting to the advertiser, IE will not show up the intermediate URL in the status bar. This is what I like, but also what I worried for. But I agree with the server request and client response and I have also read the PHP manual and cookie manual on 'header'. I think what you say is definitely correct. :)