Newbee to Web-programming

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andy

    #1

    Newbee to Web-programming

    After the server processes the page, the server sends a rendered
    HTML/text/Script client-side code down to the browser. I'm wondering
    how (in what order) does the browser interpret the text document. Does
    the browser do the HTML first and then anything between the script
    tags or is it the other way around. What would be the sequence of
    events in IE and in Netscape?

    I would appreciate if someone can shed some light on this.

    Thank you,
    Anand.
  • Randy Webb

    #2
    Re: Newbee to Web-programming

    Andy wrote:
    [color=blue]
    > After the server processes the page, the server sends a rendered
    > HTML/text/Script client-side code down to the browser. I'm wondering
    > how (in what order) does the browser interpret the text document. Does
    > the browser do the HTML first and then anything between the script
    > tags or is it the other way around. What would be the sequence of
    > events in IE and in Netscape?[/color]

    Unless explicitly told to do it differently, it processes it in the
    order its sent to the browser.

    --
    Randy
    comp.lang.javas cript FAQ - http://jibbering.com/faq

    Comment

    • Lasse Reichstein Nielsen

      #3
      Re: Newbee to Web-programming

      akasotia@guidem ail.com (Andy) writes:
      [color=blue]
      > After the server processes the page, the server sends a rendered
      > HTML/text/Script client-side code down to the browser. I'm wondering
      > how (in what order) does the browser interpret the text document. Does
      > the browser do the HTML first and then anything between the script
      > tags or is it the other way around.[/color]

      Generally, the browser parses the HTML from the begining, and when it
      meets a script element, it executes the script at that point. That is
      why "document.write " inserts its content right after the script
      element.

      Accessing parts of the page already parsed, might be possible, but
      since the DOM has not been fully build, I would not feel absolutely
      certain about accessing it before the page has loaded.

      If you give a script element the attribute "defer", then the browser
      is allowed to defer execution of that script until later, but no later
      than the execution of the next script element on the page.
      [color=blue]
      > What would be the sequence of events in IE and in Netscape?[/color]

      I believe they agree completely about the order, as does all other
      scriptable browsers.

      /L
      --
      Lasse Reichstein Nielsen - lrn@hotpop.com
      DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
      'Faith without judgement merely degrades the spirit divine.'

      Comment

      Working...