Connecting Tech Pros Worldwide Help | Site Map

META or HEADER ?

  #1  
Old July 17th, 2005, 05:58 AM
StinkFinger
Guest
 
Posts: n/a
All,
Which is better and why ?

header("Location: http://www.example.com/");
or
echo "<META HTTP-EQUIV=\"refresh\" content=\"0; url=/index.php\">";


  #2  
Old July 17th, 2005, 05:58 AM
Oliver Grätz
Guest
 
Posts: n/a

re: META or HEADER ?


StinkFinger schrieb:
[color=blue]
> All,
> Which is better and why ?
>
> header("Location: http://www.example.com/");
> or
> echo "<META HTTP-EQUIV=\"refresh\" content=\"0; url=/index.php\">";[/color]

Header!
The Location-Header can be handled on the HTTP-level, whereas for
the META-Tag the browser has to load and parse the HTML-part.
It's slower and not that error-resistent.

AllOlli

  #3  
Old July 17th, 2005, 05:58 AM
StinkFinger
Guest
 
Posts: n/a

re: META or HEADER ?


Thank you.

"Oliver Grätz" <oliver.graetz@gmx.de> wrote in message
news:408aeb08$0$11408$9b4e6d93@newsread2.arcor-online.net...[color=blue]
> StinkFinger schrieb:
>[color=green]
>> All,
>> Which is better and why ?
>>
>> header("Location: http://www.example.com/");
>> or
>> echo "<META HTTP-EQUIV=\"refresh\" content=\"0; url=/index.php\">";[/color]
>
> Header!
> The Location-Header can be handled on the HTTP-level, whereas for
> the META-Tag the browser has to load and parse the HTML-part.
> It's slower and not that error-resistent.
>
> AllOlli
>[/color]


  #4  
Old July 17th, 2005, 05:58 AM
Adriaan
Guest
 
Posts: n/a

re: META or HEADER ?


"Oliver Grätz" wrote[color=blue]
> The Location-Header can be handled on the HTTP-level, whereas for
> the META-Tag the browser has to load and parse the HTML-part.
> It's slower and not that error-resistent.[/color]

And has a different (for most needs: better) behavior for the browser's Back
button: the old (requested) location is not stored in the history.

Adriaan


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determining whether IE6 renders in Quirks or Standard mode??? Dr.Tube answers 35 July 20th, 2005 08:01 PM
That long line, &#8211; or &#151; or ... Philipp Lenssen answers 19 July 20th, 2005 04:29 PM
location header WORKING after content written...why? pinbot@gmail.com answers 11 July 17th, 2005 01:48 PM
Meta Tags Cezary answers 1 July 17th, 2005 06:12 AM