Re: How to pull existing Title tag into the body of the document as text only
From: Joseph Ellis (jandellis_at_cox.net)
Date: 08/05/04
- Next message: Craig Keightley: "Files and Folder copying"
- Previous message: Joseph Ellis: "Re: get values from array"
- In reply to: Cargear: "How to pull existing Title tag into the body of the document as text only"
- Next in thread: john henry bonham: "Re: How to pull existing Title tag into the body of the document as text only"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 04 Aug 2004 19:55:37 -0500
On 4 Aug 2004 14:59:57 -0700, cargears@gmail.com (Cargear) wrote:
>I need to be able to pull the current <Title> tag from the header into
>the body of the html page. We started coding this with php, and we
>were able to get it working. However the entire page is being parsed
>and really bogging down the system and the pages load very slowly.
>(the system is Dual P4 2.4, 1GB ram, Redhat 9.0)
>To fix this we decided to just use javascript, which worked great.
>Text loaded immediately. However, search engines will not process the
>javascript, thus this text will not be available in the document to be
>scanned.
>Does anyone have a way to pull a title tag from a document and display
>its content as text only within a document, Without loading down the
>system? When we tried it, it took the pages at least 5 times longer to
>load than without the code.
>
>Any feedback at all would be greatly appreciated. Thanks very much.
One thought that comes to mind, assuming that the pages you're talking
about have static, predefined titles, and also assuming that you're
wanting to use PHP, would be something like:
<html>
<head>
<?php $title="Whatever you want the title to be"; ?>
<title><?php echo $title; ?></title>
<!-- other head content -->
</head>
<body>
<!-- blah blah blah -->
<p>The title of this page is <?php echo $title; ?></p>
<!-- blah blah blah -->
</body>
</html>
I don't imagine that would create too much work for your server, but I
don't know what your situation is.
Take care,
Joseph
- Next message: Craig Keightley: "Files and Folder copying"
- Previous message: Joseph Ellis: "Re: get values from array"
- In reply to: Cargear: "How to pull existing Title tag into the body of the document as text only"
- Next in thread: john henry bonham: "Re: How to pull existing Title tag into the body of the document as text only"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|