Is page_header.php redundant?

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Post Reply
Verteron
Registered User
Posts: 20
Joined: Tue Aug 06, 2002 9:04 pm
Location: England
Contact:

Is page_header.php redundant?

Post by Verteron »

Just a thought - now you're using includes for the necesary templates to generate the page headers and footers each time, isn't includes/page_header.php a little redundant?

Surely better to move the GZIP, header, and the various template generation stuff to somewhere before $template->display('body'); in page_tail.php? It would work fine without any changes to other code.

Not a big thing, but it would cut your number of includes by one on each page. Maybe a little more speed, and a bit more neatness :D

User avatar
SHS`
Registered User
Posts: 1628
Joined: Wed Jul 04, 2001 9:13 am
Location: The Boonies, Hong Kong
Contact:

Is page_header.php redundant?

Post by SHS` »

If it needs to be included/generated, it needs to be done anyway.

But no, page_header.php isn't redundant as it's the page that does all the sessions, cookies and stuff and thus needs to be the very first file PHP outputs anything from.

Verteron
Registered User
Posts: 20
Joined: Tue Aug 06, 2002 9:04 pm
Location: England
Contact:

Is page_header.php redundant?

Post by Verteron »

No, common.php does that :p

The code is required, obviously... but the point I'm making is that the code could be put into page_tail.php without any problems.

Post Reply