Client Side Includes are HTML includes achieved on the client-side. This means that the inclusions can be cached on the client. It also means that web pages with includes can be viewed locally on the file system without a web server.
However, while HTML allows the direct inclusion of CSS, JavaScript and Image files into a web page it has never allowed direct inclusion of HTML. There are several tricks to achieve this, each with their own problems. These include:
- Using an IFrame, which includes content in a clearly separate, fixed size area.
- Converting the HTML code into a JavaScript program that inserts the HTML into the DOM.
- Using JavaScript with Ajax to load the HTML. No modern web browsers will generally allow this to work directly from the file system due to security concerns.
These client-side includes are relatively complex, are not accessible to WYSIWYG editors, and rely on the client's support of their respective technologies. In the case of frames and iframes, they are less accessible.
At first it seems that manually copying and recopying HTML fragments from page to page is the easiest way, but SSI/CSI pays off. In the future, browsers may implement the W3C XInclude specification which enables client-side includes. Similarly, client-side XML includes may be done in some browsers today through the use of DTDs and external entities.
Read more about this topic: Server Side Includes
Famous quotes containing the words client, side and/or includes:
“A client is to me a mere unit, a factor in a problem.”
—Sir Arthur Conan Doyle (18591930)
“The businessman who assumes that his life is everything, and the mystic who asserts that it is nothing, fail, on this side and on that, to hit the truth.... No; truth, being alive ... was only to be found by continuous excursions into either realm, and though proportion is the final secret, to espouse it at the outset is to ensure sterility.”
—E.M. (Edward Morgan)
“The older womans love is not love of herself, nor of herself mirrored in a lovers eyes, nor is it corrupted by need. It is a feeling of tenderness so still and deep and warm that it gilds every grassblade and blesses every fly. It includes the ones who have a claim on it, and a great deal else besides. I wouldnt have missed it for the world.”
—Germaine Greer (b. 1939)