1

As per my knowledge when ever a web-page is loading, always header is loading first and then body(top to bottom approach). But it makes me confused when people ask they want to load header first and body last?

Here I'm not getting what they want actually. Is there some concept which loads some portion of page first and some portion of page last?

Please help me to understand this concept. Thanks in advance.

Vladimir Starkov
  • 19,264
  • 8
  • 60
  • 114
Sumant
  • 954
  • 1
  • 18
  • 39
  • webpage is rendered from top to bottom, header stuff and then body. What exactly is your question ? – Sarfraz Jun 13 '12 at 05:46
  • My question is "Is it possible to load particular portion of a web page to be load first or last to enhance the performance of a webpage?". – Sumant Jun 13 '12 at 05:52
  • 1
    See this question how on how to improve the performance or where to put blocking stuff such as scripts: http://stackoverflow.com/questions/10994335/javascript-head-body-or-jquery/10994391#10994391 – Sarfraz Jun 13 '12 at 05:58
  • 1
    Maybe they are talking about having a "void" body part, which is filled by a script executed in the browser (once the page is loaded) using some AJAX method? Using such methods, you can load asynchronously "parts" of a page (whatever these parts are going to represent - I've interpreted "header" as a logical part of a page and not as the "head" content) – ShinTakezou Jun 13 '12 at 06:01

2 Answers2

3

First try

May be you are asking about AJAX

This technology let to

“… loads some portion of page first and some portion of page last?”

Second try

If your question is

“Is it possible to load particular portion of a web page to be load first or last to enhance the performance of a webpage?”

Put Scripts at the bottom by Yahoo

Yes, you can all scripts include at the bottom (quite before </body>). This trick let browser to render page faster (read performance improvement to end user), because browser in this case not wait to load of all scripts in your page.

Community
  • 1
  • 1
Vladimir Starkov
  • 19,264
  • 8
  • 60
  • 114
1

Short answer: nope.

Long answer: I assume that what the people in question mean is "make sure the external resources load before the page content loads." You can do this with JavaScript, but it's not always a good idea. People usually reeeeeally hate staring at a blank page for anything more than a second or two.

Tieson T.
  • 20,774
  • 6
  • 77
  • 92