473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

META or HEADER ?

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
3 2649
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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Cezary | last post by:
Hello. I was read PHP manual, but i'm not sure yet. Here is my meta tags in html: <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-2"> <META HTTP-EQUIV="Expires"...
3
by: Steven | last post by:
Hi there, I have a database with documents that have event dates included. What I need to do is have the Expires META tag to be one day after that event date. Can I get the date from the...
40
by: Harlan Messinger | last post by:
Why would anyone ever have expected a content-type META tag to be effective at all? Is it because someone was misled by the happenstance the letters of the alphabet, the digits, and the characters...
30
by: Anon | last post by:
If Http headers specify the character encoding, what is the point of the Meta tag specifying it?
13
by: Arne | last post by:
Hope this is a proper group for this post :) I came across this page about META tags that control browsers. http://www.bauser.com/websnob/meta/browsers.html Some I know, some I wonder about...
2
by: Bill Nguyen | last post by:
The HTML doc looks like this: <HTML xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> <HEAD> <META NAME="Generator" CONTENT="Microsoft MapPoint 2004">
4
by: bashetty | last post by:
Well its a strange problem i have, some of you might already faced it and have a solution. I have to maintain a set of unique "search key words" in meta tags for each content page in my site. With...
2
by: thetechturf.com | last post by:
I have some simple dynamic content pages (included below). I need to know how to add specific meta tags (ie. description, keywords, ect.), as well as extra specific header coding to a page. I would...
21
by: karen987 | last post by:
I have a news website, with asp pages. It has publishing software which allows you to add articles in a database, and then calls them up from links etc. I have added dynamic meta tags in 2 parts. The...
4
by: karen987 | last post by:
I want to draw out records from the database, and use them in my meta tags. I only want to use one record, which is called "TITLE", and i want to use this in the "title", "keywords", and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.