CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2017
    Posts
    12

    Iframe loading and processing

    Having following code

    Code:
    <iframe id="myframe" src="..."></iframe>
    
    <script>
        document.getElementById('myframe').onload = function() {
          alert('myframe is loaded');
        };
    </script>
    i wonder how does the browser processes an iframes? Does it load the iframe content in the separate thread? If so is it run synchronously with the main thread?

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Iframe loading and processing

    If it is getting run in a separate thread, why would it be executed synchronously with the main thread (i.e. why create a separate thread to run a synchronous task)?

  3. #3
    Join Date
    Oct 2017
    Posts
    12

    Re: Iframe loading and processing

    Quote Originally Posted by Arjay View Post
    If it is getting run in a separate thread, why would it be executed synchronously with the main thread (i.e. why create a separate thread to run a synchronous task)?
    So the answer is that it's run in the one main thread?

  4. #4
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Iframe loading and processing

    Quote Originally Posted by Mulligan View Post
    So the answer is that it's run in the one main thread?
    I don't know whether iFrames are run in separate threads (I suspect they may be); however, if they are run in separate threads, it would be doubtful that they would be synchronized with the main thread (because that would defeat the purpose of using a separate thread).

  5. #5
    Join Date
    Aug 2017
    Posts
    36

    Re: Iframe loading and processing

    Older browsers definitely use 1 thread. Most current browsers use 1 process. Chrome does additional tabs & iframes out of process.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured