By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,724 Members | 1,655 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,724 IT Pros & Developers. It's quick & easy.

need help regarding html title

P: 1
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
Share this Question
Share on Google+
3 Replies


P: 26
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 2.5K+
P: 3,503
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

P: 26
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.