need help regarding html title

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • psvpreddy
    New Member
    • Jan 2008
    • 1

    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?
  • astangeland
    New Member
    • Sep 2007
    • 26

    #2
    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.

    Comment

    • numberwhun
      Recognized Expert Moderator Specialist
      • May 2007
      • 3467

      #3
      Originally posted by psvpreddy
      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

      Comment

      • astangeland
        New Member
        • Sep 2007
        • 26

        #4
        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.

        Comment

        Working...