# Headers & Footers

**URL:** <https://forum.kirupa.com/t/headers-footers/111420>\
**Category:** Uncategorized\
**Created:** [May 26, 2004, 7:50pm UTC](https://forum.kirupa.com/t/headers-footers/111420 "2004-05-26T19:50:12Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![dreamerp](https://avatars.discourse-cdn.com/v4/letter/d/fbc32d/32.png) [@dreamerp](https://forum.kirupa.com/u/dreamerp)\
**Post date:** [May 26, 2004, 7:50pm UTC](https://forum.kirupa.com/t/headers-footers/111420/1 "2004-05-26T19:50:12Z")

</div>

Hi,  
When you have a footer and header, and you have the php links ?page=page or something like that, do the footers and header still change? I have a flash banner, and I don’t want it to reload every time and replay. I just want to load and include the pages, when you click on it it loads the page, but does not reload basically just the logo at the top. Also, when you echo “something”; and when you click on a link it loads it, but still has “something” there, how can I make it so when you click on the link it does not stay there, it only comes back when you click on that link again.

Thanks, and hope you can help!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 26, 2004, 8:10pm UTC](https://forum.kirupa.com/t/headers-footers/111420/2 "2004-05-26T20:10:24Z")

</div>

You can make the header and footer “wrap” the page content. Use $\_GET variables, so page=home for instance would be $\_GET[‘page’] and in this case “page” would be home. If you set up a case you can have your page like this:

```php

if (!isset($_GET['page'])) { 
    $page = "home";
}else{
    $page = $_GET['page'];
}

require_once "header.inc.php";

switch ($page){
    case 'home':
        include_once "home.inc.php";   
    break;
    case 'contact':
        include_once "contact.inc.php";
    break;
    default:
        include_once "home.inc.php";
}

require_once "footer.inc.php";

```

Not sure what you mean about the something link?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 26, 2004, 8:12pm UTC](https://forum.kirupa.com/t/headers-footers/111420/3 "2004-05-26T20:12:23Z")

</div>

Well…

You need to know how the HTTP protocol works to be able to answer this question fully.

Basically, when someone goes to a webpage, they issue a HTTP request for an URL. And the server sends a reply. The first request is usually for a HTML document. This document can have links to other URLs inside it - like images, Flash movies and frame contents.  
These links cause the browser to issue requests for more URLs to be able to show the whole page, including images and Flash content.

Before the browser issues a request for an URL it looks in its cache of files to see if it has received this file before. This is done on an URL by URL basis. If the file is in the cache, the browser just gets the file from the cache rather than sending a request to the web server for the file.

Since Flash movies are separate files, they get cached just fine.

If you have some server generated documents that are almost the same, but have separate URLs (like ?page=1, ?page=2 and so on) the browser will request each page because there is no way that it can tell that they’re almost the same.

So to maximise caching, you need to break up your pages in static and dynamic content and make sure that the static content can be retrieved by a single URL for all the pages that it’s on. Frames could be one way of doing that. A separate Javascript file that does document.write could be another.

The last part of your message about “something” I just didn’t understand. Could you rephrase it?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 27, 2004, 7:22pm UTC](https://forum.kirupa.com/t/headers-footers/111420/4 "2004-05-27T19:22:55Z")

</div>

Yeah, sorry for the choppy explanation. Basically, when you echo in php and the text shows up. Now, when you click on another link, the text that you echoed is still there. For my links I do something different: I include $page.php and then do links index.php?page=something. Something is a something.php which is saved.

But, the other question I was asking is about headers and foots. I am not sure but is there any way I can make it so the header doesn’t reload every time.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 27, 2004, 7:28pm UTC](https://forum.kirupa.com/t/headers-footers/111420/5 "2004-05-27T19:28:07Z")

</div>

Oh, sorry I didn’t mean to add in that extra part at the bottom 🙂 Thanks so much for helping!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 27, 2004, 7:28pm UTC](https://forum.kirupa.com/t/headers-footers/111420/6 "2004-05-27T19:28:51Z")

</div>

Can someone tell me a tutorial for a posting board with comments, similar to this only its news they are commenting to. Also, a tutorial for a very safe membership registration, activation, and login tutorial. Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 27, 2004, 7:55pm UTC](https://forum.kirupa.com/t/headers-footers/111420/7 "2004-05-27T19:55:42Z")

</div>

When I try to do that header require\_once every page still reloads the flash banner. Anyone know the solution?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 27, 2004, 9:42pm UTC](https://forum.kirupa.com/t/headers-footers/111420/8 "2004-05-27T21:42:49Z")

</div>

Hans made the point about reloading the banner. You might have to look into frames. My method won’t stop you from reloading the footer and header, but it shows you a use for index.php?page=somePage idea…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 28, 2004, 9:29pm UTC](https://forum.kirupa.com/t/headers-footers/111420/9 "2004-05-28T21:29:21Z")

</div>

Even if it’s a flash banner it still will not reload?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 29, 2004, 5:41am UTC](https://forum.kirupa.com/t/headers-footers/111420/10 "2004-05-29T05:41:20Z")

</div>

you can check if it has reloaded or not by:  
1· Opening your webpage…  
2· Upload a new flash to your page, that has the same code in the HTML, but instead of a red background it has a blue one…  
3· Reload your page…  
If you see it with a red background you didn’t download it again, otherwise you did. The background red/blue is just an example, a visible change that you make on your flash… good luck 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 29, 2004, 12:32pm UTC](https://forum.kirupa.com/t/headers-footers/111420/11 "2004-05-29T12:32:20Z")

</div>

Umm, that really wasn’t the thing I was looking for lol. I am discussing headers and I don’t want a logo to keep loading and doing the animation over and over every single time someone clicks a different link. I am going to experiment with Marble’s code to get it working. Any help and suggestions will help.
