> Every page on your site needed the same header, the same navigation, the same footer. But there was no way to share these elements. No includes, no components.
That's not completely true. Webservers have Server Side Includes (SSI) [0]. Also if you don't want to rely on that, 'cat header body > file' isn't really that hard.
Sure, but later in the article it says that when PHP came out it solved the problem of not being able to do includes. Which again... server-side includes predate PHP. I think that this is just an error in the article any way you slice it. I assume it was just an oversight, as the author has been around long enough that he almost certainly knows about SSI.
I have no idea when Apache first supported SSI , but personally I never knew it existed until years after PHP became popular.
I would guess , assuming that `Options +Includes` cannot be done by unprincipled users, that this being a disabled-by-default feature it was inaccessible to majority of us.
I have also dug around a bit to find out this one, and the earliest httpd I could get my hands on is 1.3.0 which is hosted on the Apache archive site: https://archive.apache.org/dist/httpd/
"src/modules/standard/mod_include.c" says:
/*
* http_include.c: Handles the server-parsed HTML documents
*
* Original by Rob McCool; substantial fixups by David Robinson;
* incorporated into the Apache module framework by rst.
*
*/
Rob McCool is the author of NCSA HTTPd so it seems there is direct lineage wrt. this feature between the two server implementations.
Archive.org tells me I was using SSI in Jan 1997. I didn’t really understand what I was doing, but including the footer and a visitor counter via an exec one which I presumably copied from somewhere else. At the time I was still on windows and had no real concept of a program being executed as a cgi or ssi, it was all “copy this from Matt’s script archive to your cgi-bin directory”
My shared hosting from claranet supported ssi via a .htaccess configuration.
Technically php was around at that point, but I don’t think it became popular until php3 - certainly my hosting provider didn’t support it until then.
The article mentions that in the very next sentence
> You either copied and pasted your header into every single HTML file (and god help you if you needed to change it), or you used <iframe> to embed shared elements. Neither option was great.
If they insist on only using vanilla HTML then the problem is unsolved to this day. I think it is actually less solved now, since back then HTML was an SGML application, so you could supply another DTD and have macro-expansion on the client.
Does it really? I think, this makes you have a wrapper and I am not sure if you can get rid of all issues with "display: contents". Also you are already in the body, so you can't change the head, which makes it useless for the most idiomatic usecase for that feature.
HTML was invented as an SGML vocabulary, and SGML and thus also XML has entities/text macros you can use to reference shared documents or fragments such as shared headers, footers, and site nav, among other things.
Not one of the downvotes, but: as far as I'm aware, there was never any syntax which could be used for HTML transclusion in the browser. There may have been SGML or XML syntaxes proposed for it, but none of them were actually implemented in this context.
You can use entities to create static sites in advance, or by including support in the browser. sgmljs can do both, and simply using shared headers/footers for static site generation from markdown and other SGML partials is explained in [1].
SP/OpenSP and older SGML tools were most certainly available and used to assemble HTML docs from command line apps in the 1990s for complex websites with lots of content such as software documentation. The editor of the HyTime spec with its strong focus on adapting and transforming to multimedia and web was working with a training/education company. W3C's long-term validator service ran off SP.
XSLT was implemented in every browser like 25 years ago and has the ability to include other document templates/fragments client-side. It's exactly the functionality everyone always says is missing.
That's not completely true. Webservers have Server Side Includes (SSI) [0]. Also if you don't want to rely on that, 'cat header body > file' isn't really that hard.
[0] https://web.archive.org/web/19970303194503/http://hoohoo.ncs...