Blog Archives

Never waste time on your website again!

I like cleaning up code. I really do. I especially liked on Darkest Faerie Lair when people would post their lookup code and ask me to make it smaller so it could pass the character limit. That was fun… in a strange sort of way.

I would really like to fix up all your code
I could make it so beautifully two-point-oh
I would really like to fix up all your code
But you've just used too many tab-whoa-oh-oh-les

Okay, okay. So you didn't use any tables, actually. I'm thinking of Neopets' new layout. Which is also disgusting. But since I don't have to actually work with their code, I don't care what they do.

But you. Oh, you. There are so many little things that just BUG ME so much. Like hyperlinks in ALL CAPS? Links lists without <ul>s? And transitional? Honestly? Disgusting!

I'd really like to change all these little things, but it would be a complete waste of my time. I am not changing anything on your layout, because it is not worth it to me.

If you have a website and you, or anyone else, will ever EVER change it EVER again, then I beg of you to PLEASE use SSI and external stylesheets. It will save you, and anyone who has to deal with your code, SO much time and frustration.

Now, I apologize to anyone who saw this title and were like "hey, I hate wasting time on my website! awesome! teach me how!" and then read this and saw that it's just the same old SSI suggestion. Yes, that's all it is. I know if I had seen that title on another site, I would've clicked and been all "excellent! *air guitar*" and then totally pissed when I saw it's something stupidly obvious that I already know.

But obviously, not everyone knows this. Not even professionals, apparently.

Use SSI. Please please please.

If you're still reading, you aren't all pissed off at my for having such an awesome title and then not delivering the goods. You probably don't know what SSI is and you probably aren't using it, so I guess I should tell you the what and how.

SSI stands for Server Side Includes. It sounds scary, but it's really not at all.

Generally, a website has a logo and navigation at the top or side and links or a copyright at the bottom. Every single page should have these same things on it. This is called your LAYOUT. The rest of the stuff is your CONTENT. Makes sense, huh?

When you update your layout or add a new page, you have to go and edit every single page and then reupload every single page. Wouldn't it be easier to just change and upload one or two pages?

Hellllll yes!

Today we'll have to do a little work, but remember, then you will never have to do this again. It is truly worth it.

Make a page called "header.shtml" (note that is MUST be .shtml!) and add your title and navigation and whatnot to this page. Do the same with "footer.shtml" and the stuff you want at the bottom of every page.

Now, replace that same code on every page except for your header and footer pages with this:

<!--#include virtual="header.shtml" -->

And for your footer:

<!--#include virtual="footer.shtml" -->

Then reupload all the files. And that is it.

Seriously.

It is just that simple.

Which is why I cannot begin to comprehend why a professional web designer can't do this.

2 Comments

Leave A Comment