By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,747 Members | 1,671 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,747 IT Pros & Developers. It's quick & easy.

META or HEADER ?

P: 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\">";
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
StinkFinger schrieb:
All,
Which is better and why ?

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


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

Jul 17 '05 #2

P: n/a
Thank you.

"Oliver Grätz" <ol***********@gmx.de> wrote in message
news:40***********************@newsread2.arcor-online.net...
StinkFinger schrieb:
All,
Which is better and why ?

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


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

Jul 17 '05 #3

P: n/a
"Oliver Grätz" wrote
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.


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
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.