SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist sp0om's Avatar
    Join Date
    Feb 2004
    Location
    MN
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    A question regarding bandwidth optimization and PHP

    I've been trying to optimize my site as much as possible to keep things running fast and to reduce bandwidth, but I think I need to clear up a few misconceptions I might have.

    I have a header.php file where I hold all of the validation functions I use for the rest of the site. It weighs about 8kb. But, when I load a page, and save it to my desktop, the page will weigh a mere 1.5 kb.

    Does that mean that the entire header.php file is not loaded? Does bandwidth only account for what is echo-ed to the browser?

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,185
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)

    PHP script weight

    The weight of the scripts will (maybe) affect server load, but bandwidth is only what is transferred in response to the request. For example, if you have script that queries a large database it will slow down the response to the request, but once the server proccesses the script then the download speed is affected by the output weight.

  3. #3
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sp0om
    Does bandwidth only account for what is echo-ed to the browser?
    Yes, as that is the only data transferred over the network from your server to the viewer.


Bookmarks

Posting Permissions

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