The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Separating content/footer/header - worth the trouble?

Depending on the design, I've made both separated HTML documents (those with footer.html, header.html, content.html, etc) and single documents with everything 'baked in.'

The separated-approach sometimes makes xHTML compliance difficult, because you can't easily validate a partial document, which usually doesn't have META tags, style declarations, and DOCTYPEs.

However, I do like seperate headers and footers because I feel like I'm being efficient.

But how is that different compared to using Templates in a web-dev program like Dreamweaver? Does it save any bandwidth? When I view a document that is automatically generated from multiple files, aren't I actually downloading the same amount of data that appears in a single 'chubby' HTML document?

Does it save any bandwidth? When I view a document that is automatically generated from multiple files, aren't I actually downloading the same amount of data that appears in a single 'chubby' HTML document?

It doesn't save bandwidth but it doesn't really add any.

The main advantage is to the site programmer (you) because it reduces maintenance requirements. If you have your header/footer in separate files and you decide to change them then you only have to change 1 file to get a site wide change as opposed to having to change every file on the site.

About the bandwidth: Using includes or not makes no difference to bandwidth (you're serving out the same amount of HTML code either way), but the server load with includes can become an issue if your site gets a lot of traffic. I have yet to see it make a huge impact on server load more, as other things tend to drain it out quicker (i.e. unclosed database connections or objects).