467,074 Members | 892 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

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

need help regarding html title

In my application, while loading the page, the title of page is displaying total filepath. Even if explicitly set the title also, before loading the page , path is displayiing as title. once the page loaded , then only the customized title is displaying.

Could you please help me out,that how could we change the title of the page , before loading the page?
Jan 7 '08 #1
  • viewed: 1026
Share:
3 Replies
A quick test indicates that FF2, IE6, and IE7 all display the title as soon as it gets that far in the HTML. I recommend you move the title to be the 4th line of your document right after <!DOCTYPE>, <html>, and <head>.

If this is a dynamic script (PHP, ASP, JSP, etc) make sure that you output the title as soon as you get there. Sometimes scripts will build up large chunks of the page before it actually sends them to the browser. For example, if you are using PHP, you can put a <?php flush(); ob_flush(); ?> right after the title to force PHP to sent the title as soon as possible.

It will still display the filename but not for very long. A faster server, or geolocated servers are probably about the only other thing you can do to reduce time it displays the filename for.

Also I don't know for sure but using proper XHTML, with a strict doctype, should allow the browser to parse it faster, but I doubt it would help anyone besides Firefox, and only if you were serving your pages with a server-side header of application/xhtml+xml which is it's own whole can of worms.

Also what makes the page take so long to display that you notice this? Is it a long running server script, or a big html file, or just a slow (free/cheap hosting) server? Maybe a little more information could help, us help you. Let me know what you find out.
Jan 8 '08 #2
numberwhun
Expert Mod 2GB
In my application, while loading the page, the title of page is displaying total filepath. Even if explicitly set the title also, before loading the page , path is displayiing as title. once the page loaded , then only the customized title is displaying.

Could you please help me out,that how could we change the title of the page , before loading the page?
Also, if you could post your code next time, that would help with troubleshooting.

Regards,

Jeff
Jan 8 '08 #3
Oh, one more idea. You could use an iframe or a frameset to load one simple page (with a title), that then loads the longer loading page in a frame. Not very clean, but it might help depending on your particular situation.
Jan 8 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

25 posts views Thread by Steal | last post: by
7 posts views Thread by Ż5 | last post: by
1 post views Thread by Irshad Ahmad | last post: by
1 post views Thread by vikjohn | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.