>> Bandwidth? I use SSI to include the link for the right external
>> The assuption is that the SSI will always write the same link so the
>> page you hit will cache the file for the rest of the pages. Bandwidth
>> savings begin with the second page and accrue from there.
>Is that so? My uneducated guess is that the server has to parse each page,
>insert the style sheet file, then serve it to the browser. Therefore, the
>total page file size downloaded every time is increased by the
>server-included files which couldn't possibly by cached because the server
>served only one file.
<sigh>I must have been really having a Bad Day that day to have so many
people completely miss what I was saying.
Let me amplify upon my remarks, to hopefully dispel the cloud of
I use SSI to write the statement "<link rel='Stylesheet' type='text/css' "
and the href of the correct external stylesheet to use for this page.
Therefore, the external stylesheet will be cached upon the browser's first
page hit, and since the browser isn't changing, the link statement in each
subsequent file also isn't changing, so the stylesheet for the subsequent
pages will be read from the browser's cache.
The server therefore *does* parse each page (which was why my original post
carried the caveat that it wouldn't scale up to high-volume levels but
would probably not be noticed by "normal" traffic levels) and so processing
load on the server should be monitored, but no undue burden should be seen
on sites with average hit numbers.
The server most certainly does *not* insert the stylesheet into the served
page. I called it an "external stylesheet" in the message as quoted above
because it gets linked to the page via a <link> tag written into the served
page by the SSI code in the browser. The total page size is increased by
the number of characters it takes to write the proper <link> tag into the
served html file. Since the browser then requests the css file named in the
<link> tag, the browser will cache that file separately, just as if the
<link> had been written in the file by an editor in the first place.
This saves bandwidth, as the external css file is downloaded only once to
the browser's cache during the visit to the site, unless the vistor
suddenly either changes browsers or changes the way in which the browser
So I trade a minor increase in processing overhead (normally not a crucial
item on a server) for a lowered bandwidth (as opposed to the original
example, where the SSI was written into the header of the page itself)
which is a resource generally in far shorter supply on a server.
Does that succeed now in making what said above clear?
Chief Managing Director In Charge, Department of Redundancy Department
In God we trust; all others must provide data.
Opinions expressed are mine and mine alone.
If JCI had an opinion on this, they'd hire someone else to deliver it.
Sponsored by www.westciv.com - CSS resources | software | learning