Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > Computer Support > Any equivalent of #include in HTML?

Reply
Thread Tools

Any equivalent of #include in HTML?

 
 
Ed B. Norton
Guest
Posts: n/a
 
      07-05-2003
Hi,

Teaching myself HTML, I was struck that it would be a true lazy
person's boon (besides making a site's HTML stuff faster to download)
if there were something equivalent to the "#include" directive of
C/C++. (My feeling is, there's probably not, since aren't the files a
sort of script for a browser -- in the old days we would say that
they're executed interpretively rather than compiled.) But coming back
to IT after a long abscence, what do I know about what's truly out
there? So if anyone does know of such, I would greatly appreciate it
if they shared the sources of the knowledge.

Thanks,

Ed B. Norton
 
Reply With Quote
 
 
 
 
°Mike°
Guest
Posts: n/a
 
      07-05-2003
I'm not sure, exactly, what you mean, but most web designers
use style sheets (and possibly other methods) to reduce the
size and clumsiness of web pages.


On Sat, 05 Jul 2003 16:43:47 GMT, in
<Xns93AF817557948semidemihemiquaver@204.127.36.1 >
Ed B. Norton scrawled:

>Hi,
>
>Teaching myself HTML, I was struck that it would be a true lazy
>person's boon (besides making a site's HTML stuff faster to download)
>if there were something equivalent to the "#include" directive of
>C/C++. (My feeling is, there's probably not, since aren't the files a
>sort of script for a browser -- in the old days we would say that
>they're executed interpretively rather than compiled.) But coming back
>to IT after a long abscence, what do I know about what's truly out
>there? So if anyone does know of such, I would greatly appreciate it
>if they shared the sources of the knowledge.
>
>Thanks,
>
>Ed B. Norton


--
STGP, OGPE24HSHD
 
Reply With Quote
 
 
 
 
Blinky the Shark
Guest
Posts: n/a
 
      07-05-2003
Ed B. Norton wrote:

> Teaching myself HTML, I was struck that it would be a true lazy
> person's boon (besides making a site's HTML stuff faster to download)
> if there were something equivalent to the "#include" directive of
> C/C++. (My feeling is, there's probably not, since aren't the files a
> sort of script for a browser -- in the old days we would say that
> they're executed interpretively rather than compiled.) But coming back
> to IT after a long abscence, what do I know about what's truly out
> there? So if anyone does know of such, I would greatly appreciate it
> if they shared the sources of the knowledge.


The other answers so far are about CCS. I suspect you're looking for a
way to, say, have each of your pages include the same header or footer,
or some other kind of text slug, and only have to maintain one master
copy of that slug, whatever it is. In other words, you want to include
*content*, not styling. CSS isn't relevant to your quest, if I read you
right. If I understand you, then...

You can use a preprosser that will do what you wish. That can be done
server-side, if the underlying software is available there, or locally (,
before you upload your HTML) with, for instance, the preprocessor I use,
which is nothing but a small perl script:

http://stone.thecoreworlds.net/software/dolt/

It will replace a line with this format:

<!--* filename.txt *-->

With the filename specified.

I believe this is what you're looking for.

--
Blinky Linux RU 297263
Spam: The Boulder Pledge http://snurl.com/boulder
All In The Family http://snurl.com/familything
 
Reply With Quote
 
G
Guest
Posts: n/a
 
      07-05-2003
"Ed B. Norton" <(E-Mail Removed)> wrote in message news:<Xns93AF817557948semidemihemiquaver@204.127.3 6.1>...
> Hi,
>
> Teaching myself HTML, I was struck that it would be a true lazy
> person's boon (besides making a site's HTML stuff faster to download)
> if there were something equivalent to the "#include" directive of
> C/C++. (My feeling is, there's probably not, since aren't the files a
> sort of script for a browser -- in the old days we would say that
> they're executed interpretively rather than compiled.) But coming back
> to IT after a long abscence, what do I know about what's truly out
> there? So if anyone does know of such, I would greatly appreciate it
> if they shared the sources of the knowledge.
>
> Thanks,
>
> Ed B. Norton


There are ways to "include" files/scripts with .asp, .php and .js.
HTML allows you to "include" hyperlinked pages in frames and iframes.
These are still downloaded at each visit though.

With activeX and java, you can create an object to be downloaded,
cached and reused on subsequent visits. This does save download time.
 
Reply With Quote
 
Ed B. Norton
Guest
Posts: n/a
 
      07-06-2003
"Ed B. Norton" <(E-Mail Removed)> wrote in
news:Xns93AF817557948semidemihemiquaver@204.127.36 .1:

> Hi,
>
> Teaching myself HTML, I was struck that it would be a true lazy
> person's boon (besides making a site's HTML stuff faster to
> download) if there were something equivalent to the "#include"
> directive of C/C++.

<snip>
> Thanks,
> Ed B. Norton


Thanks to all for answering. Especial thanks to Bl. the Sh., because
he saw through my tangled verbiage and suggested a preprocessor (with
URL no less!) that was closest to what I had in mind (which was, the
use of compiler directives in C/C++, among many other things, to save
re-inventing the wheel and programming time, plus to give a multi-
entity project the same feel to all of its user interfaces, etc.)

But considering the purpose of HTML, some (or even most) of that last
aim can be accomplished by CSS (which I have been putting off getting
into for too long). And I would be able to make pages smaller,
quicker, & in less time if I were conversant with the concept...

G, I am intrigued by the possibilites you mention. But ActiveX & Java
will have to wait for some time in the hopefully near future.

Thanks again,
Ed B. Norton
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
501 PIX "deny any any" "allow any any" Any Anybody? Networking Student Cisco 4 11-16-2006 10:40 PM
IS THERE ANY EQUIVALENT TO DISPOSE()? abenm613@mail.ru Java 7 12-13-2005 02:25 AM
Any Eclipse equivalent to WSAD server perspective? Jay Eckles Java 1 02-19-2004 08:39 AM
Any one got a Packard bell IGO 3491 or the NEC equivalent with these specs????? Dooby Computer Support 8 10-02-2003 06:12 AM



Advertisments