Re: Static Text in Style Sheets
by "Arcady"<arcady(at)jps.net>
|
Date: |
Thu, 10 Feb 2000 19:34:38 GMT |
To: |
HWG Techniques <hwg-techniques(at)hwg.org> |
|
todo: View
Thread,
Original
|
|
I do this as a matter of routine for footers and global navigation schemes.
Essentially you need:
<script src="read_in_file.js"></script>
And then in said file:
document.writeln('<html tags and other goodies>text</whatever>etc.');
It has several benefits over Server Side Includes:
1. It's not dependant on what server software your current hosting company is
using. If you expect you might have to move the site...
2. It's faster. There's no work done on the server end. So it doesn't slow down
for a busy site. Rather the work is done by the client who in this case has
more resources.
3. It pre-caches a lot of your information and code. If I go to a page that
has body-copy, a header.js, nav.js, and footer.js include then I cache all of
those. When I go to the next page and it uses the same three includes I only
have to download the body-copy. This dramaticly speeds up my ddownload time
on pages after the first.
4. The same benefit as SSI's, it is easier to update.
Drawback: anyone who hasn't bought anything computer or software wise since
1997 nor ever recieved a free AOL disk will not be able to see it. But then
this is a less than 1% of the browsing community figure. And this figure is
not likely to pay attention to any message you may have had anyway. It's the
basic rule of communication that you cannot target everyone, doing so will lessen
your impact. So target those who you can predict will listen.
>
>WebProgrmr(at)aol.com wrote:
>
>> [snip]
>> You can also do this same thing with JavaScript but I'm not a JS code monkey.
>>
>> The benefit of JS is that it's not server dependent. You can likely make
it
>> do what SSI does with less hassles.
>> [snip]
>
>Can anybody give me any idea of how this can be done in JS? Also, does anybody
>know whether Geocities allows SSI on their *free* web pages?
>
>> > Is there a way to place static test in a style sheet that will be
>> > displayed
>> > on all pages linked to that style sheet using HTML commands? I am a little
>> > new to style sheets and not sure if this is even possible.
>
>--
>Regards,
>Er. Harshdeep Singh Jawanda.
>
>The covers of this book are too far apart.
>-Ambrose Bierce, reviewing a book.
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>Alternate E-mail: harshdeep(at)graffiti.net
>
>Web page: http://www.pspl.co.in/~harsh
> http://www.geocities.com/hsjawanda
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>
>
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA