5 ms·
> 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 component
by 1718627440 11mo ago
> 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.
[0] https://web.archive.org/web/19970303194503/http://hoohoo.ncsa.uiuc.edu/docs/tutorials/includes.html https://web.archive.org/web/19970303194503/http://hoohoo.ncs...
- Gualdrapo 11mo agoI think they meant that from a vanilla HTML standpoint
- alehlopeh 11mo agoHTML frames let you do this way back in the day
- pimlottc 11mo agoThe 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.
- bigstrat2003 11mo agoSure, 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.
- rzzzt 11mo agoPHP's initial release announcement mentions includes as a feature that can be used even if the server does not have SSI support: https://groups.google.com/g/comp.infosystems.www.authoring.cgi/c/PyJ25gZ6z7A/m/M9FkTUVDfcwJ https://groups.google.com/g/comp.infosystems.www.authoring.c...
- 1718627440 11mo agoDoes it, other than using PHP? To me it sounds like that feature to use instead of SSI is PHP.
- rzzzt 11mo agoI meant the "include" statement of PHP which you can use even if your HTTP server is not configured for processing SSI directives.
- 1718627440 11mo agoBut the HTTP server needs to be configured for PHP and were are discussing the situation pre-PHP.
- NathanOsullivan 11mo agoI am off similar vintage to the author. 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.
- 1718627440 11mo agoIf 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.
- mixmastamyk 11mo agoObject tag can do it. iframe also with limitations.
- 1718627440 11mo agoDoes 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.
- mixmastamyk 11mo agoGets you header, footer, components. Most of head would be nice but you typically want a custom title for example.
- tannhaeuser 11mo agoHTML 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.
- 1718627440 11mo agoNot sure, why you are getting downvoted, as that was pretty much the case before HTML5.
- duskwuff 11mo agoNot 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.
- tannhaeuser 11mo agoYou 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]. [1]: https://sgmljs.sgml.net/docs/producing-html-tutorial/producing-html-tutorial.html https://sgmljs.sgml.net/docs/producing-html-tutorial/produci...
- duskwuff 11mo agoI think you're missing the point here. None of these things were available to users writing HTML for web browsers in the 1990s.
- tannhaeuser 11mo agoSP/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.
- vaylian 11mo agoXSLT could have been the answer. But browsers are now dropping support for it.
- nine_k 11mo agoWell, frames and iframes both provide client-side "includes". They cannot be arbitrary components though.