View Full Version : Adding include files in html
emanuelle
08-09-2006, 10:31 AM
I am making a demo in HTML.
How do I add include?
Only .js include work?
mburt
08-09-2006, 12:45 PM
I'm not sure what you're asking, maybe if you could clarify the situation, I would be able to answer.
blm126
08-09-2006, 04:11 PM
HTML can only be included server side.
shachi
08-09-2006, 07:08 PM
Try Hinclude. (http://www.mnot.net/javascript/hinclude.html)
mwinter
08-10-2006, 12:36 AM
Try Hinclude. (http://www.mnot.net/javascript/hinclude.html)
Though I respect Mark Nottingham's work regarding HTTP caching, I find this rather questionable. Were it to be used in a purely XHTML context - that is, XHTML served with an appropriate XHTML content type - it would be somewhat respectable. However, the demonstration itself is served as HTML, and no doubt others would use it in a similar fashion. In that context, the markup is completely bogus. The code itself is also of dubious quality: there's not a hint of feature detection, and the exception handling will cause older browsers to error out unconditionally.
Even the use "as-is" within an XHTML document is questionable as the XInclude specification already provides for agent-driven inclusion, and is already supported by some XML processors.
Content inclusion should be performed server-side, using either SSI (server-side includes) or a language like PHP. Mark's apparent nod towards caching seems to be ignoring the fact that the output from server-generated content can be cached on the server and later served without regeneration (unless desired due to a change in the data source). He also seems to be ignoring the obvious problems related to relying on client-side scripting.
Mike
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.