Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2006
    Posts
    225
    Thanks
    6
    Thanked 3 Times in 3 Posts

    HTTP requests, iframes, external files

    I am aware that reducing the total number of HTTP requests a page makes can reduce page loading times.

    If I have a page with a number of iframes, each of which includes an external stylesheet and an external script file, is that three requests for each iframe? Or is it only one request for each unique file?

    Example:
    I have index.php, which contains iframes one.php and two.php. That's 3 HTTP requests. (I think?) If index.php, one.php, and two.php all reference stylesheet.css and script.js, is that 2 additional HTTP requests, or 6?

    Thanks to anyone who helps me understand.

  • #2
    Regular Coder
    Join Date
    Sep 2007
    Location
    AZ, USA
    Posts
    685
    Thanks
    6
    Thanked 46 Times in 46 Posts
    The total number of HTTP requests would be:

    1 for index.php
    + 2 for the iframes
    + 3 for the stylesheets in the iframes and index.php
    + 3 for the javascripts in the iframes and index.php
    --------
    = 9


  •  

    Posting Permissions

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