I’m going hog-wild – well, not really, but a little bit – beginning to use includes to save editing many pages.
Succeeded beautifully with links down the right sides of my new-layout pages (only three out of some 30 or more done so far – have to edit them to stick in the includes). (Visible on three of my pages: articles.htm, about.htm, index.htm (see signature for site).
Then I realized I’d been wanting to use includes for the masthead (banner) image and the footer one too. I got includes going for the footer text.
Also succeeded with image includes; they look like this:
[code]
<!–#include file=”include/codogacc.txt” –>
and codogacc.txt looks like this:
[code]
<div id=”masthead”>
<a href=”index.htm”><img alt=”Where Eagles and Herons Watch Dogs (32KB)” title=”Where Eagles and Herons Watch Dogs” src=”images/logos/codogacc.jpg” /></a>
</div>
I left the divs in there to make it easier for me to see where to put the include statement into the page, but duhhh! I just realized I don’t have to do that; I can put a comment in there (in a template), to show me where to put it.
But then I thought, well, that codocacc.txt looks as though there’s a kind of double whammy on the server. I have no idea! I wondered if I could “include only the image itself,” and if so, what would the coding look like?
I started trying, something like this:
[code]
<a href=”index.htm”><img alt=”Where Eagles and Herons Watch Dogs (32KB)” title=”Where Eagles and Herons Watch Dogs” src=”<!–#include file=”include/codogacc.jpg” –> /></a>
ARGH! I was scared even to try that. It doesn’t look right to me at all!
It’s not right, is it? Or is it? should I dare try it?
Or is there another, better way to do it than the examples above?
Here is what I’m concerned with: making things as efficient as possible on the server and also for the visitor – load as quickly as possible, keep server load comfortable (whatever!) I don’t know what all the implications are, in case somebody would like to explain them to me.
Except, of course, for my editing; using SSIs makes my editing job much, much easier, if I want to change anything any time. Only have to edit the single, tiny included file. Once. Once only. Per change, haha!
Implications are? Thanks in advance!
Thu, 14 Apr 2005 17:26:53