Any equivalent of #include in HTML?

Discussion in 'Computer Support' started by Ed B. Norton, Jul 5, 2003.

  1. Ed B. Norton

    Ed B. Norton Guest

    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
     
    Ed B. Norton, Jul 5, 2003
    #1
    1. Advertising

  2. Ed B. Norton

    °Mike° Guest

    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
     
    °Mike°, Jul 5, 2003
    #2
    1. Advertising

  3. 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
     
    Blinky the Shark, Jul 5, 2003
    #3
  4. Ed B. Norton

    G Guest

    "Ed B. Norton" <> wrote in message 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++. (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.
     
    G, Jul 5, 2003
    #4
  5. Ed B. Norton

    Ed B. Norton Guest

    "Ed B. Norton" <> 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
     
    Ed B. Norton, Jul 6, 2003
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dooby
    Replies:
    8
    Views:
    1,716
    Dooby
    Oct 2, 2003
  2. Networking Student
    Replies:
    4
    Views:
    1,410
    vreyesii
    Nov 16, 2006
  3. Laurent Gelu

    HTML Photo Librairy Software. (Casio Photoloader equivalent)

    Laurent Gelu, May 5, 2005, in forum: Digital Photography
    Replies:
    0
    Views:
    328
    Laurent Gelu
    May 5, 2005
  4. Laurent Gelu

    HTML Photo Librairy Software. (Casio Photoloader equivalent)

    Laurent Gelu, May 5, 2005, in forum: Digital Photography
    Replies:
    0
    Views:
    304
    Laurent Gelu
    May 5, 2005
  5. Monima
    Replies:
    0
    Views:
    1,848
    Monima
    Dec 14, 2010
Loading...

Share This Page