468,471 Members | 1,770 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,471 developers. It's quick & easy.

Meta Tags

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" CONTENT="0">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-store, no-cache,
must-revalidate, max-age=0, post-check=0, pre-check=0">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

<META NAME="title" CONTENT="test">
<META NAME="description" CONTENT="Test description.">
<META NAME="keywords" CONTENT="a b c">
<META NAME="robots" CONTENT="All">
<META NAME="copyright" CONTENT="x y z ">
<META NAME="author" content="x y z">

and here is in PHP:

// META TAGS CONFIGURATION
// Cache deactivate
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always
modified

// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);

// HTTP/1.0
header("Pragma: no-cache");

header("Content-Type: text/html;charset=ISO-8859-2">;
header("Title: test");
header("Content-Description: Test description.");
header("Keywords: a b c");
header("Robots: All");
header("Copyright: xyz");
header("Author: xyz");

Is PHP code correct?
Any suggestions appreciated.

Greets,
Cezary.
Jul 17 '05 #1
1 3730
"Cezary" <ce*****@imail.net.pl> wrote in message news:<c7**********@nemesis.news.tpi.pl>...
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" CONTENT="0">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-store, no-cache,
must-revalidate, max-age=0, post-check=0, pre-check=0">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
AFAIK, the above Meta tags are kind of fix or HTML workaround for
the headers.

<META NAME="title" CONTENT="test">
<META NAME="description" CONTENT="Test description.">
<META NAME="keywords" CONTENT="a b c">
<META NAME="robots" CONTENT="All">
<META NAME="copyright" CONTENT="x y z ">
<META NAME="author" content="x y z">
And the above Meta tags and attributes are pure HTML.
and here is in PHP:

// META TAGS CONFIGURATION
// Cache deactivate
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always
modified

// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);

// HTTP/1.0
header("Pragma: no-cache");

header("Content-Type: text/html;charset=ISO-8859-2">;
All above are AFAIK, Ok.
header("Title: test");
header("Content-Description: Test description.");
header("Keywords: a b c");
header("Robots: All");
header("Copyright: xyz");
header("Author: xyz");


Hmmm... AFAIK, no. These are not headers and can be called as
user-defined headers. But, I guess, there is no effect of these
headers. Also, think, if such user-defined headers are present, it
must be prefixed with "X" like header("X-Author: xyz").

--
| Just another PHP saint |
Email: rrjanbiah-at-Y!com
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Brian | last post: by
1 post views Thread by Darren Blackley | last post: by
19 posts views Thread by Christian Hvid | last post: by
24 posts views Thread by Day Bird Loft | last post: by
23 posts views Thread by Fast Eddie | last post: by
4 posts views Thread by clintonG | last post: by
16 posts views Thread by Edward | last post: by
3 posts views Thread by Jordan S. | last post: by
4 posts views Thread by King Coffee | last post: by
1 post views Thread by kmladenovski | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.