SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: php includes

  1. #1
    SitePoint Enthusiast raynebair's Avatar
    Join Date
    Dec 2000
    0 Post(s)
    0 Thread(s)
    My site uses includes to load the header and footer. It still takes a long time to load on a slow connection.

    Are there any suggestions on how to speed up my load timeand still keep the same look on all my pages without having to code every page?

    Would smaller includes work better than 2 large ones?

  2. #2
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    East Lansing, MI USA
    0 Post(s)
    0 Thread(s)
    The includes should not greatly slow down your site so much that you are noticing it.

    A browser doesn't even know that a page started in 2 or more pieces. The server reads your request from the browser, pulls this PHP page and sends it to the PHP interpreter. The interpreter sees the includes, packages them in to the page, and sends that to the browser.

    So if your page is loading, just slowly, then its not the includes, since the page is sent to the browser as 1 piece, not as 2 or 3.

    If the includes were slowing it down there would be a delay in getting a response from the server, the same with anything serverside, like DB queries and the like.

    So look for other culprits as to why your page is loading slowly, perhaps images or tables.

    Chris Beasley - I publish content and ecommerce sites.
    Featured Article: Free Comprehensive SEO Guide
    My Guide to Building a Successful Website
    My Blog|My Webmaster Forums


Posting Permissions

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