Results 1 to 5 of 5

Thread: to include or not to include

  1. #1

    Thread Starter
    Fanatic Member nabeels786's Avatar
    Join Date
    Jul 2001
    Location
    New York
    Posts
    919

    to include or not to include

    Hello all,

    I'm currently using a Dreamweaver template for my site, so the header is about 50 lines, and the footer about 50 too.

    I was wondering, is it better (ie, uses less bandwidth) to include the header/footer in instead of have the html code repeat each time?

    I know it makes it more readable, but other than that, is there an advantage?

    PHP Code:
    <my header code>
    ...
    <
    my php code>
    ...
    <
    my footer code>


    ///or

    include("path/to/header");
    <
    my php code>
    include(
    "path/to/footer"); 
    Thanks
    Visit www.fragblast.com
    Gaming, forums, and a online RPG/Battle system




    (__Flagg) DOT NET? is this a Hindi Dating service?

  2. #2
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    I'd throw my vote to use include. It's just much easier on you. It doesn't use any more bandwidth, but it could slow load time down. Yet, even on dialup, it'd probably not be noticable.

    I've never had a problem doing it.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  3. #3
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    it's just another file the server has to get

    also, it means you change 1 file for changes to your header and footer, instead of many

  4. #4

    Thread Starter
    Fanatic Member nabeels786's Avatar
    Join Date
    Jul 2001
    Location
    New York
    Posts
    919
    I decided not to use it, like da_silvy said, its another file the server has to process. Updating templates isn't a problem, since I won't be changing the design. Besides, Dreamweaver automatically updates all the sites's pages if you change the template
    Visit www.fragblast.com
    Gaming, forums, and a online RPG/Battle system




    (__Flagg) DOT NET? is this a Hindi Dating service?

  5. #5
    Lively Member
    Join Date
    Aug 2002
    Location
    UK
    Posts
    70
    If the header and footer are the same for ever page then i would stick them in a js and include them from there.

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