Jump to content

[SOLVED] <title> near end of page?


Azu

Recommended Posts

Hi, the way my pages are generated, the title is created last. I could make it come first, but the performance would be a little bit slower then.

 

So I am just wandering, is there a way that I can have the <title></title> near the end of the page while still being xhtml1.1 compliant?

And if not, is there at least a way to make it so that it won't mess anything up? It seems to work right in FF/Opera/IE but I want to be sure it works right all the time.

Link to comment
Share on other sites

Hmm.. I tried putting the <head></head> at the end.. but then it complains about my <body></body> and says my <html></html> isn't finished o_O

 

 

 

<?header("Content-type: application/xhtml+xml; charset=iso-8859-1");?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><body><ins>Hello!</ins></body><head><title>^_^</title></head></html>

 

 

Fails W3C =(

Link to comment
Share on other sites

well xhtml is even more strict in its requirement for good code so it (should) demand(s) that you are more standards compliant with your code - the base principles still apply and the title tag is still one that shoudl be in the header section to define the title of the page.

 

w3schools have a decent xhtml section too btw...

Link to comment
Share on other sites

Title should be at the top of page for the best standards and it will fail w3c if there not but try

 

There are no 'best standards', just a standard.

 

Hi, the way my pages are generated, the title is created last. I could make it come first, but the performance would be a little bit slower then.

 

Can you provide more information on that? What sort of title is generated 'last'? How are these pages generated? Why do you think 'performance' would be slower if the title were created first?  How much slower - a microsecond or a minute?

Link to comment
Share on other sites

On one page, I need to query data from a database(which I have no control of, only read).

 

I need to select a row with a certain ID, and from that some text, and another ID. Then I need to do the same with that ID, etc, until there is no more.

Then I take the first word from the last row and search another table for it, and that result from that should be the title.

 

And it takes a while to generate.

 

So I can either not display any of the data until I have gotten it all, and then stick the title on the front and then display the data

 

Or I can display each line as it is retrieved, and then put in the title. But I don't know how to do this without making the page not valid. I would really like a way to do this, I don't how know to though..

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.