How do I make Page Frames / Header html a file that is Referenced... ?

Discussion in 'HTML & Website Design' started by BeFit4Free, Sep 5, 2008.

?

Is it possible to remove html that makes up page frame / header from top of source?

  1. Yeah, It's easy

    50.0%
  2. Probably, but I'm not sure how...

    50.0%
  3. Definitely not (I say this because I know as little as you do).

    0 vote(s)
    0.0%
  4. I'd just use Frames if I was you... (If you click this, you probably know NOTHING about SEO...)

    0 vote(s)
    0.0%
Multiple votes are allowed.
  1. #1
    Hey guys,
    This could be a good question for a college student or other web designer. I own an eCommerce web site that uses pipes ||info|| to include relevant information in templates.

    I am interested in taking the html that creates the page frame and removing that code from the top of each page and making it a separate file that is referenced in some type of include. Here's the URL to the page frame if you want to look at what I mean: http://www.befit4free.com/framedesigns/default

    The html code that makes up this page frame is huge and is terrible for SEO purposes. I want to make it a separate file so that the information on each page ( ||PAGE|| ) is easier to optimize without loosing keyword density etc.

    Can you help???

    I just need tips, I don't actually need someone to do the work... Any ideas???
     
    BeFit4Free, Sep 5, 2008 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #2
    I'm not 100% certain I'm following what you are asking, though I'm guessing you want to do some form of includes so you can have a header (and/or footer) that's in a separate file, but is sent as one URL, correct?

    If so, then you should use some form of server side script to do this. Stay away from framesets because they are a miserable /FAIL/ at accessability, likewise stay away from AJAX/DHTML/CRS/JAVASCRIPT/PAFNA on the same grounds.

    There are three easy choices for doing this - SHTML, PHP and ASP. SHTML is Apache only, ASP is 'generally' windows only, PHP works everywhere. (Gee, this is a tough choice - NOT)

    Just rename your pages .php, put your header (including your doctype, <head></head><body><h1>, etc) in header.inc.php, your footer (</body></html> and anything that would be the same at the bottom of every page) in footer.inc.php, then your actual document people would access would just read:

    <?php include('header.inc.php'); ?>
    Your actual page content would go here
    <?php include('footer.inc.php'); ?>

    Pretty simple - if you choose SHTML or ASP it works much the same, just the syntax and commands are different.
     
    deathshadow, Sep 5, 2008 IP
  3. BeFit4Free

    BeFit4Free Peon

    Messages:
    71
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you look at the URL that is my Page Frame: http://www.befit4free.com/framedesigns/default
    is there a way to make this a file that is referenced but not actually included in the source code for each page?

    I'm interested in taking all that code out of the source content of each page. If I simply deleted the code, I'd have no page frame or header... How do I make it look the same but not contain all that code on each page?
     
    BeFit4Free, Sep 20, 2008 IP